Skip to content

Instantly share code, notes, and snippets.

@mischa
Created May 28, 2011 20:07
Show Gist options
  • Save mischa/997179 to your computer and use it in GitHub Desktop.
Save mischa/997179 to your computer and use it in GitHub Desktop.
export EDITOR=vim
alias v='mvim'
alias serv='python -m SimpleHTTPServer'
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
# Rails
alias rs='rails s --debugger'
alias sc='script/console --debugger'
alias rc='rails console --debugger'
alias hc='heroku console'
alias sg='script/generate'
alias rg='rails generate'
alias cucumber='cucumber --backtrace'
alias at='bundle exec autotest'
alias cuc='cucumber -r features/support/ -r features/step_definitions/'
alias migrate='rake db:migrate'
export AUTOFEATURE=true
# Ruby
alias 187='rvm use 1.8.7-p249'
alias 192='rvm use 1.9.2'
alias ree='rvm use ree'
# Chef
alias 'kcu'='knife cookbook upload'
alias 'krff'='knife role from file'
#Git
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
alias gitx='/Applications/GitX.app/Contents/Resources/gitx'
alias gx='/Applications/GitX.app/Contents/Resources/gitx'
alias c='git commit -a -m'
alias s='git status'
alias push='git push origin $(parse_git_branch)'
alias pull='git pull origin $(parse_git_branch)'
alias a='git add .'
alias gd='git diff'
alias gch='git checkout'
alias m='git merge'
alias gb='git checkout -b'
alias gs='git status'
alias master='gch master'
alias gbd='git branch -d'
# Workflow
function review {
git checkout -b "$*" && pull
}
alias ship='cap production deploy'
export PS1='\[\033[0;31m\]\h:\[\033[0;37m\]\w\[\033[00m\]\[\e[0;00m\]~$(parse_git_branch)\[\033[0;31m\]$ \[\e[m\]\[\e[0;37m\]'
#Unix
alias l='ls'
alias la='ls -la'
alias lh='ls -lh'
alias o='open .'
alias cl='clear'
alias linecount='find . -type f | xargs cat | wc -l'
# RVM
if [[ -s /Users/momoro/.rvm/scripts/rvm ]] ; then source /Users/momoro/.rvm/scripts/rvm ; fi
export PATH=$PATH:/Users/momoro/Code/django/django/bin:/usr/local/share/npm/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment