Created
June 24, 2011 15:22
-
-
Save dt/1045008 to your computer and use it in GitHub Desktop.
Bash Aliass
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 rebash="source ~/.bashrc" | |
function ff { | |
grep -H -R -o -n -I "$*" * | |
} | |
function ffi { | |
grep -H -R -o -n -i -I "$*" * | |
} | |
function ffb { | |
grep -H -R -o -n "$*" * | |
} | |
function ffbi { | |
grep -H -R -o -n -i "$*" * | |
} | |
alias ..='cd ..'; | |
alias cd..='cd ..'; | |
alias cd.='cd ..'; | |
alias cd,,="cd .."; | |
alias ks="echo 'missed the L key, dumbass' && ls " | |
alias gb="git branch -a --color -v" | |
alias url='wget -q -O - ' | |
alias g="gcc -ansi -pedantic -Wall -Wextra -O2" | |
alias hstat="history | awk \"{print $2}\" " # | sort | uniq -c | sort -n" | |
alias classes="cd ~/Dropbox/classes/" | |
alias projects="cd ~/Dropbox/projects/" | |
alias work="cd ~/code/foursquare.web" | |
alias core="cd ~/code/foursquare.web/core/src/main/scala/com/foursquare/" | |
alias web="cd ~/code/foursquare.web/web/src/main/scala/com/foursquare/" | |
alias mt='dependencies/mongodb/bin/mongod --dbpath=mongo-testdb/' | |
alias prodconsole='ssh -t staging.foursquare.com "bash -c ~/prod_console.sh"' | |
alias staging='ssh -t staging "screen -R -S staging"' | |
alias rsml="rlwrap sml" | |
alias svm="svn" | |
alias kb='kill %1' | |
alias dedupe_itunes='find . -iname "* 1.mp3" | while read i; do b=${i% 1.mp3}.mp3; if [[ -f "$b" ]]; then rm "$i";echo "Removing $i"; fi; done' | |
alias rebash='source ~/.bashrc' | |
alias gitup='git pull --rebase origin master' | |
tab() { | |
cmd="" | |
if [ -n "$*" ]; then | |
cmd=" | |
write text \"$*\"" | |
fi | |
osascript <<EOF | |
tell application "iTerm" | |
tell the first terminal | |
set currentSession to current session | |
launch session "Default Session" | |
tell the last session | |
write text " cd $(pwd)" $cmd | |
end tell | |
select currentSession | |
end tell | |
end tell | |
EOF | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment