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
#!/bin/bash | |
ps=/bin/ps | |
grep=/usr/bin/grep | |
tmux=/usr/local/bin/tmux | |
cmus=/usr/local/bin/cmus | |
cmus-remote=/usr/local/bin/cmus-remote | |
sleep=/usr/local/Cellar/coreutils/8.17/libexec/gnubin/sleep | |
echo {query} # use query like shift $((OPTIND-1)) |
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
#!/bin/bash | |
# USEAGE: | |
# slowy "remove latest limiter | |
# slowy 20 "set limiter as 20KByte/s for 80 port | |
# another choice (http://slowyapp.com/) | |
if [ {query} ]; then | |
sudo ipfw pipe 1 config bw {query}KByte/s && sudo ipfw add 1 pipe 1 src-port 80 | |
echo 'bandwidth.max is {query}KByte/s for 80 port' | |
else |
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 clone | |
https://github.com/maranas/pyNotificationCenter.git | |
https://github.com/thedjpetersen/gmaillib.git | |
(!!!) gmaillib.py line 51 has indents error, add ' ' before 'if' | |
https://github.com/thedjpetersen/gmaillib/blob/master/gmaillib.py#L51 | |
''' | |
import tornado.ioloop | |
from gmaillib import gmaillib |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>local.goagent</string> | |
<key>ProgramArguments</key> | |
<array> |
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
$ vi ~/.inputrc | |
# $ ssh [press up/down] | |
# ssh remote_a ssh remote_b | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
set show-all-if-ambiguous on | |
set completion-ignore-case on |
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
#! /bin/bash | |
state=$(networksetup -getsocksfirewallproxy Wi-Fi | grep ^Enabled: | cut -d : -f 2,2) | |
if [ $state == Yes ] | |
then | |
cmd=off | |
else | |
cmd=on | |
fi |
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
import datetime | |
def parse_date(date_string, format='%Y-%m-%d', seg=','): | |
''' defualt date_string == 'yesterday' | |
available alias 'week','month','year' or timestr: '2013-0101' | |
relativedate = latest_parse_date or today | |
parse_date('2011-01-01') | |
=> datetime(2011,01,01) |
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
get_timestamp_by_object_id = (oid)-> | |
#[ref]:https://github.com/justaprogrammer/ObjectId.js/blob/master/src/main/javascript/Objectid.js#L55 | |
return Number('0x' + oid.substr(0, 8))*1000 |
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
/** | |
[preview](http://minus.com/i/7myP2XHfeHXv.png) | |
*/ | |
.layout-main { | |
width: 100%; | |
} | |
.layout-secondary { | |
display: none; | |
} |
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
keymap f LIST_MENU | |
keymap d CLOSE_TAB | |
#keymap t TAB_LINK | |
keymap t TAB_GOTO | |
keymap gT PREV_TAB | |
keymap gt NEXT_TAB | |
keymap gg BEGIN | |
keymap C-f NEXT_PAGE |