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
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "("${ref#refs/heads/}")" | |
} | |
# PS1 prompt color vars | |
export PROMPT_DIRTRIM='2' #only works with bash 4.x | |
RED="\[\033[1;31m\]" | |
YELLOW="\[\033[0;33m\]" |
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
startup_message off | |
defscrollback 10000 | |
altscreen on | |
bindkey -k F2 kill #f12 | |
bindkey -k F1 detach #f11 | |
hardstatus alwayslastline | |
hardstatus string "%{.K.}%D %M %d %C:%s%a | %-Lw%{.K.}%{= rW}%50>%n* %t%{-}%+Lw%<" | |
shell -bash |
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
[diff] | |
tool = opendiff | |
[color] | |
ui = auto | |
[alias] | |
graph = log --graph --decorate --pretty=short | |
findbranch = "! git branch -a | ack $1" | |
[user] | |
name = My Name |
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
.DS_Store | |
*.swp | |
*.swo | |
.*.sw[a-z] | |
*.un~ | |
Session.vim | |
*.pydevproject | |
.project | |
.metadata | |
bin/** |
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
#in .bash_profile... | |
function prettyjson | |
{ | |
if [ $1 ]; then | |
curl -s $1 | python -mjson.tool | |
else | |
echo "specify a url"; | |
fi | |
} |
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
#set ubuntu as default | |
function bootUBUNTU { | |
sudo cgpt add -i 6 -P 5 -S 1 /dev/sda | |
} | |
#set chromeos as default | |
function bootCHROMEOS { | |
sudo cgpt add -i 6 -P 0 -S 1 /dev/sda | |
} |
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
set number | |
syntax on | |
filetype on | |
filetype plugin on | |
set expandtab | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set wildmenu |
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
alias tippy='python ~/path/to/this/thing/tip.py -s' | |
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
# stick this in your .bash_profile | |
alias throttle150='sudo ipfw pipe 1 config bw 150Kbps && sudo ipfw add 1 pipe 1 src-port 80' | |
alias throttle300='sudo ipfw pipe 1 config bw 300Kbps && sudo ipfw add 1 pipe 1 src-port 80' | |
alias throttleOff='sudo ipfw delete 1' |
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
//////////////////////////////////////////////////////////////////////////////// | |
// MyProtocol.h | |
//////////////////////////////////////////////////////////////////////////////// | |
@protocol MyProtocol <NSObject> | |
-(void) thisThingDidDoSomething:(OriginalThing*)sender; | |
-(void) thisThing:(OriginalThing*)sender didDoSomethingWithThing:(Thing*)thing; | |
@end | |
//////////////////////////////////////////////////////////////////////////////// |
OlderNewer