dotfiles/aliases

54 lines
1.7 KiB
Plaintext
Raw Normal View History

2009-03-20 00:08:06 +11:00
alias gem='sudo gem' # sick of always forgetting sudo
alias ls='ls -G'
alias ll='ls -lah'
alias ..='cd ..;' # can then do .. .. .. to move up multiple directories.
alias ...='.. ..'
alias g='grep -i' #case insensitive grep
alias h='history|g'
alias ducks='du -cks * | sort -rn|head -11' # Lists the size of all the folders
alias top='top -o cpu'
alias systail='tail -f /var/log/system.log'
alias m='mate .'
2009-03-26 23:59:07 +11:00
alias o='open .'
2009-03-20 00:08:06 +11:00
alias et="m"
alias home='cd ~' # the tilda is too hard to reach
alias c='clear' # shortcut to clear your terminal
alias eprof='mate ~/.dot-files'
alias sprof='source ~/.bash_profile'
# useful command to find what you should be aliasing:
alias profileme="history | awk '{print \$2}' | awk 'BEGIN{FS=\"|\"}{print \$1}' | sort | uniq -c | sort -n | tail -n 20 | sort -nr"
# rails stuff
alias log='tail -f -0 ./log/*.log'
alias ss='ruby ./script/server'
alias sc='ruby ./script/console'
alias cdm='cap deploy deploy:migrate'
alias model='script/generate model'
alias controller='script/generate controller'
alias migration='script/generate migration'
alias migrate='rake db:migrate'
alias rollback='rake db:rollback'
alias startpg='sudo /Library/StartupItems/PostgreSQL/PostgreSQL start'
# replacement netstat cmd to find ports used by apps on OS X
alias netstat="sudo lsof -i -P"
alias hidefile='/usr/bin/SetFile -a "V"'
alias showfile='/usr/bin/SetFile -a "v"'
alias colorslist="set | egrep 'COLOR_\w*'" # lists all the colors
function f() { find * -name $1; }
2009-03-20 00:08:06 +11:00
function manpdf() { man -t $@ | open -f -a Preview; }
function osinfo() {
x1="$(/usr/bin/sw_vers -productName)"
x2="$(/usr/bin/sw_vers -productVersion)"
x3="$(/usr/bin/sw_vers -buildVersion)"
x4="$(/usr/bin/arch)"
echo "${x1} - ${x2} - ${x3} - ${x4}"
2009-03-20 00:08:06 +11:00
}