Skip to content

Instantly share code, notes, and snippets.

@praveen-symphony
Forked from subelsky/aliases.sh
Created October 27, 2016 01:59
Show Gist options
  • Save praveen-symphony/71b941e40b1da6fdd34c0638d778d659 to your computer and use it in GitHub Desktop.
Save praveen-symphony/71b941e40b1da6fdd34c0638d778d659 to your computer and use it in GitHub Desktop.
Useful aliases for Ruby and Rails development and git maintenance
alias a='ack'
alias a?='alias | grep -i'
alias adx='rake db:drop && rake db:create && heroku pg:transfer --from black --to postgres://postgres@localhost/staq_development --confirm staqweb --app staqweb && rails r "User.all.each { |u| u.update_attribute(:password,%q(password)) }" && rake db:test:prepare'
alias b='bundle'
alias bb='bundle install --binstubs=.bundle/bin --path=.bundle/gems && bundle package --all && reload ; sd'
alias bc='bin/console'
alias be='bundle exec'
alias bea='bundle exec annotate'
alias bu='bundle update'
alias bus='bundle update staq_extraction'
alias busl='bundle update staq_extraction --local'
alias cdd='cd -'
alias cov='env COVERAGE=true rspec spec && open coverage/index.html'
alias cs='check_statuses' # a script that checks all my git repos for any dirty state
alias e='exit'
alias ea='vim -f ~/Dropbox/dotfiles/bash/aliases && source ~/Dropbox/dotfiles/bash/aliases'
alias ec='vim -f ~/Dropbox/dotfiles/bash/config && source ~/Dropbox/dotfiles/bash/config'
alias ee='vim -f ~/Dropbox/dotfiles/bash/env && source ~/Dropbox/dotfiles/bash/env'
alias fp='fury push'
alias fs='foreman start'
alias g='git'
alias ga='git add'
alias gar='git add --all'
alias gb='git branch'
alias gca='git commit --amend'
alias gco='git checkout'
alias gcob='git checkout -b'
alias gcp='git cherry-pick'
alias gd='git diff'
alias git='hub' # https://github.com/github/hub
alias gl='git pull'
alias glg='git lg'
alias glp='git pull && git push'
alias gms='git merge --squash'
alias go='git log -p'
alias gp='git push'
alias gpu='git push -u origin'
alias gr='git reset --soft HEAD^'
alias gs='git status -sb'
alias h='heroku'
alias hl='heroku logs --tail'
alias ho='heroku addons:open'
alias hoa='heroku addons:open airbrake'
alias hr='heroku run'
alias hrbc='heroku run bin/console'
alias hrc='heroku run env NEWRELIC_ENABLE=false rails console'
alias hrr='heroku run rake'
alias l='ls -lhGt'
alias l.='ls -d .[^.]*'
alias la='ls -A -l -G'
alias ll='ls -lhG'
alias ls='ls -G'
alias lt='ls -alrt'
alias m.='~/bin/m .' # MacVim helper
alias md='mkdir -p'
alias mupd='git pull && bundle update && rake spec; sd'
alias mvim='rvm system do ~/bin/mvim'
alias p='ping 4.2.2.2'
alias pre='bundle exec rake assets:precompile:primary RAILS_ENV=production'
alias prod='export STAQ_PROD_DATABASE_URL=`heroku config:get DATABASE_URL --app staqweb`'
alias ps?='ps ax | grep -i'
alias r='rake'
alias rc='rails console'
alias rd='rake deploy'
alias rdbm='rake db:migrate db:test:clone_structure'
alias reload='source ~/.bashrc && rvm reload'
alias rg='rails generate'
alias rgm='rails generate migration'
alias rs='bundle exec rspec spec'
alias rsf='bundle exec rspec spec/features'
alias rsi='bundle exec rspec spec/integration'
alias rsl='bundle exec rspec spec/lib'
alias rss='rspec *_spec.rb'
alias rupd='git pull && bundle && rdbm ; sd'
alias sd='growlnotify -m '\''it is done'\'''
alias sk9='sudo kill -9'
alias so='source'
alias sv='sudo vim'
alias tl='tail -f log/*.log'
alias upd='git pull && bundle ; sd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment