Skip to content

Instantly share code, notes, and snippets.

View theJian's full-sized avatar
👾
Fighting space invaders

Tan Kian theJian

👾
Fighting space invaders
  • Anaemia Studios
  • The place where there is no darkness.
View GitHub Profile
@theJian
theJian / 0_reuse_code.js
Last active August 30, 2015 18:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@theJian
theJian / gist:e62426c0e33a0659f007
Last active September 15, 2015 01:26 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@theJian
theJian / Nodejs.md
Created September 15, 2015 07:13
NodeJs 模块

当模块的文件名是index.js,加载模块时可以使用模块所在目录的路径代替模块文件路径,以下两条语句等价。

var cat = require('/home/user/lib/cat');
var cat = require('/home/user/lib/cat/index');
@theJian
theJian / .md
Created September 23, 2015 17:24
Traversing the DOM use jquery

Here is our DOM

body
|
|-h1
| |
| |-"Traversing the ..."
|
|-h2
| |
@theJian
theJian / ss-install.md
Created February 12, 2016 15:18 — forked from aa65535/ss-install.md
shadowsocks-libev install at Debian or CentOS

Debian

cd /tmp
# 下载源码
git clone https://github.com/madeye/shadowsocks-libev.git
# 开始编译
cd shadowsocks-libev
./autogen.sh
./configure --prefix=/usr && make
make install
@theJian
theJian / .js
Created March 7, 2016 13:08
pass arguments to callback function
function callback(a, b) {
return function() {
console.log('sum = ', (a+b));
}
}
var x = 1, y = 2;
document.getElementById('someelem').addEventListener('click', callback(x, y));

Keybase proof

I hereby claim:

  • I am theJian on github.
  • I am thejian (https://keybase.io/thejian) on keybase.
  • I have a public key whose fingerprint is 6479 A388 C1D7 3960 EB52 AD38 F1A5 222F C4E2 F99C

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am theJian on github.
  • I am thejian (https://keybase.io/thejian) on keybase.
  • I have a public key whose fingerprint is 6479 A388 C1D7 3960 EB52 AD38 F1A5 222F C4E2 F99C

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am theJian on github.
  • I am thejian (https://keybase.io/thejian) on keybase.
  • I have a public key whose fingerprint is 6479 A388 C1D7 3960 EB52 AD38 F1A5 222F C4E2 F99C

To claim this, I am signing this object:

@theJian
theJian / bash_tips.sh
Created September 14, 2016 15:05
bash tips
# last command
!!
# last command beginning with xyz
!xyz
# print rather than excuting last command
!!:p
# the end of previous command