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
#!/bin/bash | |
BASE_PATH=/tmp/$(basename $(pwd))_$(date "+%Y-%m-%d-%H%M%S") | |
if [ -z "$1" ]; then | |
BACKUP_ARCHIVE=$BASE_PATH.tar.gz | |
else | |
BACKUP_ARCHIVE="$BASE_PATH"_\(${1// /-}\).tar.gz | |
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
#!/bin/bash | |
if [[ $1 ]] | |
then | |
BACKUP_ARCHIVE=$(basename $(pwd))_$(date "+%Y-%m-%d-%H%M%S")_\(${1// /-}\).tar.gz | |
echo "backing up to "$BACKUP_ARCHIVE | |
tar -czf $BACKUP_ARCHIVE . | |
cp -pv $BACKUP_ARCHIVE ~/Dropbox/Backups | |
rm -v $BACKUP_ARCHIVE | |
echo done | |
else |
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 | |
//////////////////////////////////////////////////////////////////////////////// |
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
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
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
#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
#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
.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
[diff] | |
tool = opendiff | |
[color] | |
ui = auto | |
[alias] | |
graph = log --graph --decorate --pretty=short | |
findbranch = "! git branch -a | ack $1" | |
[user] | |
name = My Name |
NewerOlder