Skip to content

Instantly share code, notes, and snippets.

@jnunemaker
Created March 31, 2010 18:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save jnunemaker/350680 to your computer and use it in GitHub Desktop.
Save jnunemaker/350680 to your computer and use it in GitHub Desktop.
alias reload='. ~/.bashrc'
alias ea="$EDITOR ~/bin/dotfiles/bash/aliases && reload"
alias ee="$EDITOR ~/bin/dotfiles/bash/env && reload"
alias eh="$EDITOR ~/bin/dotfiles/bash/heroku && reload"
# Processes
alias tu='top -o cpu'
alias tm='top -o vsize'
# Projects
alias mm='cd ~/dev/projects/mongomapper'
alias joint='cd ~/dev/projects/joint'
alias code='cd ~/dev/ruby/code'
alias harm='cd ~/Sites/harmony'
alias proj='cd ~/dev/projects'
# General
alias l='ls -lah'
alias h='history'
alias c='clear'
alias o='open .'
alias e='mate .'
alias tf='tail -f -n 100'
alias rbash='source ~/.bashrc'
alias httpdump='sudo tcpdump -i en0 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"'
# GIT
alias git=hub
alias gb='git branch'
alias gl='git log'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gcam='git commit --amend'
alias gd='git diff | mate'
alias gp='git pull'
alias gpr='git pull --rebase'
alias gpu='git push'
alias gst='git status'
alias gs='git stash'
alias gsa='git stash apply'
alias gsp='git stash pop'
alias gsl='git stash list'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias gpuh='git push && git push heroku master'
# mongod run --config /usr/local/Cellar/mongodb/1.2.0-x86_64/mongod.conf
alias mstart='launchctl load -w /usr/local/Cellar/mongodb/1.2.4-x86_64/org.mongodb.mongod.plist'
alias mstop='launchctl unload -w /usr/local/Cellar/mongodb/1.2.4-x86_64/org.mongodb.mongod.plist'
# SVN
alias svnclear='find . -name .svn -print0 | xargs -0 rm -rf'
alias svnaddall='svn status | grep "^\?" | awk "{print \$2}" | xargs svn add'
# RUBY
alias irb='irb --readline -r irb/completion'
alias i='irb -rubygems'
alias ss='script/server'
alias sc='script/console'
alias sg='script/generate'
alias r='rake'
alias rt='rake -T'
alias restart='touch tmp/restart.txt'
alias migrate='rake db:migrate && rake db:test:prepare'
#RVM
alias r18='rvm use 1.8.7'
alias r19='rvm use 1.9.1'
@kmayer
Copy link

kmayer commented Mar 31, 2010

This is a YMMV thing. I'm always conflicted about shortcuts that obscure intent. My pairing partners always have a different set of aliases, so we waste energy learning each others aliases. I can't remember if it was Kernigan or Richie, but the reason Unix commands are so short is because they were terrible typists, so it slowed them down (especially on the 110baud ttys of the time). I can touch type at a reasonable speed, so that's not where the friction lies (again, for me).

I prefer aliases that change some standard settings, but keep the executable name the same. E.g. ls="ls -FCG"

Oldster tip: Dont't forget, you can always prevent an alias with a backslash!

\ls isn't aliased.

@jnunemaker
Copy link
Author

I pretty much only work on my own computer so I don't run into many sharing issues, but good point for those that haven't thought about that.

@scottwb
Copy link

scottwb commented Mar 31, 2010

Nice. Love the httpdump alias you have.

@jnunemaker
Copy link
Author

I believe I snagged that from peter cooper. He tweeted it a while back. I think.

@vesan
Copy link

vesan commented Apr 1, 2010

@kmayer didn't know about the backslash thing. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment