yurko
8/31/2015 - 8:03 AM

zsh_aliases

zsh_aliases

# add source $HOME/.aliases to .zshrc

alias rakedbm='rake db:migrate'
alias rakedbmt='rake db:migrate && rake db:migrate RAILS_ENV=test'
alias rakedbp='rake db:drop && rake db:create && rake db:migrate'

alias gitl='git log --graph --full-history --all --color \
        --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"'

alias aliases='gedit ~/.aliases && . ~/.zshrc'
alias go='git checkout '
alias s='git status'
# improve save with taking last commit hash and make git commit -ac <commit>
alias save='git add --all && git commit -m "SAVEPOINT"'
alias hrk='git push heroku HEAD:master'
alias force='git push -uf '
alias pg='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'

compose() {
  rails new $1 -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb
}

bake () { 
    bundle exec rake "$@"
}

alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

alias testenv='RAILS_ENV=test rake db:drop && RAILS_ENV=test rake db:create && RAILS_ENV=test rake db:migrate'