Skip to content

Instantly share code, notes, and snippets.

View clarencetw's full-sized avatar
🏠
Working from home

Clarence clarencetw

🏠
Working from home
View GitHub Profile
const a = ['a', 'b'];
const b = ['b', 'c'];
Array.prototype.diff = function(a) {
return this.filter(function(i) {return a.indexOf(i) < 0;});
};
console.log("A diff B: ", a.diff(b));
console.log("B diff A: ", b.diff(a));
const { performance: perf } = require('perf_hooks');
function test() {
};
let code = {
domain: 'abcdef.com',
account: 'ab@abc.com'
}
curl -X POST -H 'Authorization: Bearer [access_token]' -F 'message=foobar' https://notify-api.line.me/api/notify
Content-Type: multipart/mixed; boundary="==BOUNDARY=="
MIME-Version: 1.0
--==BOUNDARY==
Content-Type: text/cloud-boothook; charset="us-ascii"
# Install nfs-utils
cloud-init-per once yum_update yum update -y
cloud-init-per once install_nfs_utils yum install -y nfs-utils
var FB = require('fb');
var readline = require('readline');
FB.options({
appId: '',
appSecret: '',
redirectUri: ''
});
@clarencetw
clarencetw / MacFileRemoverForSVN
Created April 2, 2016 01:12 — forked from cillosis/MacFileRemoverForSVN
Remove ._. and .DS_* files from folder on Mac OS X
find . -type f \( -iname "._*" \) -exec svn delete {} \;
find . -type f \( -iname ".DS_*" \) -exec svn delete {} \;