const ts = Date.now();
const sign = ts + sha256(Math.floor(1.01 * ts).toString()).toUpperCase().substring(0, 32);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://git.io/ -i -F "url=https://shawjia.github.io/vkxd/2018/11/05-fund" -F "code=start-fund" | |
# you get https://git.io/start-fund |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BACKUP_DIR=~/Documents/settings/app-list/`hostname` | |
mkdir -p $BACKUP_DIR | |
cd $BACKUP_DIR | |
# backup brew | |
/usr/local/bin/brew bundle dump --force | |
# back node packages | |
source ~/.nvm/nvm.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"_id":"weibo-jiangnan","startUrl":["https://weibo.cn/u/2189910831"],"selectors":[{"id":"weibo","type":"SelectorElement","parentSelectors":["_root","next-page"],"selector":"div.c[id^=M]","multiple":true,"delay":0},{"id":"time","type":"SelectorText","parentSelectors":["weibo"],"selector":"span.ct","multiple":false,"regex":"([\\s\\S]+)(?=来自)(?=[\\s\\S]+)","delay":0},{"id":"msg","type":"SelectorText","parentSelectors":["weibo"],"selector":"_parent_","multiple":false,"regex":"","delay":0},{"id":"img","type":"SelectorImage","parentSelectors":["weibo"],"selector":"img.ib","multiple":false,"delay":0},{"id":"comment","type":"SelectorElementAttribute","parentSelectors":["weibo"],"selector":"a.cc","multiple":false,"extractAttribute":"href","delay":0},{"id":"next-page","type":"SelectorLink","parentSelectors":["_root","next-page"],"selector":"div.pa a:nth-of-type(1)","multiple":false,"delay":0}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('div.col-9 span.follow button') | |
.forEach((ele, i) => { | |
setTimeout(() => { | |
console.log(ele.click(), ele.title); | |
}, i * 100); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sips -s format gif doge.png --out doge.gif |
- 编写 Objective-C 代码 简单扼要
Category extends class functionality without subclassing.
#import "ClassName.h"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
load from CoffeeScript | |
just load, nothing else | |
### | |
{hello} = require './test' | |
hello() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
http://coffeescript.org/#cake | |
`cake -n jia morning` | |
### | |
option '-n', '--name [NAME]', 'name to say morning to' | |
task 'wake', 'Wake up', -> | |
console.log 'Time to wake up' |
NewerOlder