Skip to content

Instantly share code, notes, and snippets.

View belltoy's full-sized avatar
🎯
Focusing

Zhongqiu Zhao belltoy

🎯
Focusing
View GitHub Profile
@belltoy
belltoy / gitlab-ci.schema.json
Created July 22, 2024 08:02
gitlab CI schema for v13.x
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://gitlab.com/.gitlab-ci.yml",
"markdownDescription": "Gitlab has a built-in solution for doing CI called Gitlab CI. It is configured by supplying a file called `.gitlab-ci.yml`, which will list all the jobs that are going to run for the project. A full list of all options can be found [here](https://docs.gitlab.com/ee/ci/yaml). [Learn More](https://docs.gitlab.com/ee/ci/index.html).",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"format": "uri"
},
@belltoy
belltoy / tsdb_blog.md
Created July 12, 2020 10:59 — forked from sacreman/tsdb_blog.md
Time Series DB Smack Down

Databases are a crazy topic and it seems everyone has an opinion. The trouble is that opinions are like belly buttons. Just because everyone has one it doesn’t mean they are useful for anything.

Time series databases (TSDB’s) in particular always provoke the usual “have you tried X”, where X is some obscure project with 50 commits back in 2009. Invariably, if X is something a bit more mainstream then yes, it probably has been played with. It’s probably good at certain things and bad at others like all software.

With all of the above in mind I decided to pen a magnum opus of my own opinions. Something I can point the HaveYouTriedX’ers at next time they make an appearance. So here it is..

My Top10 TSDB’s:

  1. DalmatinerDB (no surprise here)
  2. InfluxDB
@belltoy
belltoy / solarized_dircolor_fix.sh
Created April 27, 2014 15:16
Solarized dircolor fix
# To install get a `fix` for "ls", open a terminal and copy/paste the following commands:
# - Solarized Dark:
cd ~
wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-dark
mv dircolors.ansi-dark .dircolors
eval `dircolors ~/.dircolors`
# -Solarized Light:
cd ~
@belltoy
belltoy / censorship_in_google.js
Created June 1, 2012 06:56
black list of China censorship
//https://www.google.com.hk/?esrch=SearchNotices::OptIn&q=%E8%83%A1%E8%90%9D%E5%8D%9C&hl=zh-CN
// Access the URL above and run this code in the console.
var b=_.L.NF().getKey(),c= _.L.NF().eH(),f=[];
for(var g=0,l=c.length,t=[],i; i=c[g],g<l; f.push(t.join('')),g++)
for(t=[],p=0;p<i.length;++p)
t.push(window.String.fromCharCode(i[p]^b));
console.log(f.join('\n'));
@belltoy
belltoy / gist:2014935
Created March 11, 2012 03:57 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@belltoy
belltoy / .bashrc
Created April 22, 2011 15:55
show git/hg branch name with colors in prompt
# show git/hg branch name with colors in prompt
PS1='`a=$?;if [ $a -ne 0 ]; then echo -n -e "\[\e[01;32;41m\]{$a}\[\033[00m\]"; fi`${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[01;35m\]@\[\033[00m\]\[\033[01;33m\]\h\[\033[00m\]\[\033[00m\] `b=$(git branch 2>/dev/null | sed -e "/^ /d" -e "s/* \(.*\)/\1/"); if [ "$b" == "" ]; then c=hg;b=$(hg branch 2>/dev/null | sed -e "/^ /d" -e "s/* \(.*\)/\1/");else c=git;fi; ([[ "$b" != "" ]] && echo -n -e "\[\033[01;34m\]\W\[\033[00m\]\[\033[01;35m\]\[\e[36;40m\]($c: $b)\[\033[01;32m\]\[\e[00m\]" ) || ( echo -n -e "\[\033[01;34m\]\w\[\033[00m\]" )`\[\033[01;35m\]\$\[\033[00m\] '