I hereby claim:
- I am bolasblack on github.
- I am c4605 (https://keybase.io/c4605) on keybase.
- I have a public key whose fingerprint is EA86 3E37 3F20 BAD7 42BF A42A C704 6C4E 9F79 C1AB
To claim this, I am signing this object:
originJSON = window.JSON or global.JSON | |
JSON = { | |
parse: (-> originJSON.parse.apply originJSON, arguments) | |
# http://stackoverflow.com/a/4901205 | |
stringify: (obj, replacer, space) -> | |
unicodeRE = /[\u007f-\uffff]/g | |
# 如果直接在 JSON.stringify 的 replacer 里面加 '\\u' ,结果会真的被 JSON | |
# 替换为 \\u ,最终输出的结果就是 {"a": "\\u007f"} ,所以需要在得到 json 以 |
server { | |
listen 80; | |
server_name ci.server.name; | |
ignore_invalid_headers off; | |
access_log /var/log/nginx/jenkins.access_log main; | |
error_log /var/log/nginx/jenkins.error_log info; | |
location / { |
> ~ $ echo '{"ni":1}' | LANG=en_US.utf-8 python -c 'import json, sys; print json.dumps(sys.stdin.read())' | |
"{\"ni\":1}\n" | |
> ~ $ echo '{"ni":1}' | LANG=en_US.utf-8 python -c 'import json, sys; print json.dumps(json.loads(sys.stdin.read()), indent=2, separators=(",", ": "))' | |
{ | |
"ni": 1 | |
} |
#!/sbin/runscript | |
DAEMON=/usr/local/sbin/ocserv | |
PIDFILE=/var/run/ocserv.pid | |
LOGFILE=/var/log/ocserv.log | |
DAEMON_ARGS="-f -d 1" | |
extra_commands="debug" | |
depend() { |
#!/sbin/runscript | |
extra_commands="debug" | |
SENTRY_COMMAND="/home/sentry/sentry-env/bin/sentry" | |
SENTRY_CONFILE=/home/sentry/sentry.conf.py | |
SENTRY_USER=sentry | |
SENTRY_PIDFILE=/var/run/sentry.pid | |
SENTRY_LOGFILE=/home/sentry/sentry.log |
params = (search = location.search) -> | |
RE = /(\?|&)([^=&]+)(=([^&$]*))?(?=&|$)/ | |
matches = search.match RegExp RE.source, 'g' | |
return {} unless matches | |
matches.reduce (memo, elem) -> | |
matchParts = elem.match RE | |
value = matchParts[4] | |
# if value is '' or undefined, keep it |
#!/bin/bash | |
while read oldrev newrev ref; do | |
result=$(GIT_WORK_TREE=/path/to/deploy/repo git checkout -f $newrev) | |
if [ $? -eq 0 ]; then | |
echo 'Deploy Success!' | |
else | |
echo $result | |
fi | |
done |
I hereby claim:
To claim this, I am signing this object:
nil |
tell application "iTerm2" | |
activate | |
set windowCount to count of terminal windows | |
-- display dialog windowCount as text | |
if windowCount is 0 then | |
create window with default profile | |
delay 0.1 |