This file contains hidden or 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
| #!/usr/bin/env bash | |
| # put your hosts file into /etc/hosts.d/ | |
| # | |
| # usage: | |
| # chhost $your-host-name | |
| # restore: | |
| # chhost | |
| HOSTD=/etc/hosts.d |
This file contains hidden or 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
| //jweixin-1.0.0.js | |
| ! function(g, initFunc) { | |
| 'function' == typeof define && (define.amd || define.cmd) ? define(function() { | |
| return initFunc(g) | |
| }) : initFunc(g, true) | |
| }(this, | |
| function(glob, setGlobal) { | |
| function invokeCmd(cmd, param, callbackObj) { | |
| glob.WeixinJSBridge ? WeixinJSBridge.invoke(cmd, normParameter(param), function(res) { | |
| completeBridgeInteraction(cmd, res, callbackObj); |
This file contains hidden or 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
| URL.prototype.__defineGetter__('query', function() { | |
| var params = {}; | |
| this.search.substr(1).split('&').map(function(param){ | |
| var pair = param.split('='); | |
| params[ pair[0] ] = pair[1]; | |
| }); | |
| return params; | |
| }); |
This file contains hidden or 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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| atom.workspace.observeTextEditors (editor) -> | |
| editor.onDidSave -> |
This file contains hidden or 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
| git log '@{1 weeks ago}..HEAD' --shortstat --pretty=format:%an | awk '/.+/ { | |
| if($2 != "file" && $3 != "changed,") { | |
| curr = $1 | |
| } else { | |
| files[curr]+=$1 | |
| inserts[curr]+=$4 | |
| deletes[curr]+=$6 | |
| } | |
| } | |
| END { |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # | |
| LOG_DIR=/var/sankuai/logs/myfe-canary | |
| # | |
| DATE=$(date +%F) | |
| PID="$LOG_DIR/myfe-canary-0.pid" | |
| # | |
| LOG_STDOUT="$LOG_DIR/stdout.log" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # curl -s https://gist.githubusercontent.com/song940/d61c5dec2359a9a324b9/raw/mp4ba.sh | bash | |
| URL="http://www.mp4ba.com" | |
| for i in `seq 71`; do | |
| INDEX_CONTENT=$(curl -s "$URL/index.php?page=$i") | |
| HASH=$(echo $INDEX_CONTENT | grep -o "hash=\w*") | |
| for hash in `echo $HASH`; do |
This file contains hidden or 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
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2013 Yannick Albert <http://yckart.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains hidden or 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
| Host * | |
| ControlPersist yes | |
| ControlMaster auto | |
| ControlPath ~/.ssh/master-%r@%h:%p |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # | |
| # | |
| PROJECT_ID=1 | |
| SENTRY_VERSION=7 | |
| SENTRY_NAME="sentry-cli" | |
| SENTRY_KEY=5660affd663b4e4e8f0ca25c96dce705 | |
| SENTRY_API="http://sentry.lsong.org/api/$PROJECT_ID" | |
| ORIGIN="http://lsong.org" |