Skip to content

Instantly share code, notes, and snippets.

@rdeguzman
Last active December 11, 2015 09:59
Show Gist options
  • Save rdeguzman/4583891 to your computer and use it in GitHub Desktop.
Save rdeguzman/4583891 to your computer and use it in GitHub Desktop.
RAILS_ENV shell shortcuts.. no need to type export RAILS_ENV=development
https://github.com/rdeguzman/dotfiles/blob/master/zsh/aliases
# cd
alias ..='cd ..'
# ls
alias ls="ls -F"
alias l="ls -lAh"
alias ll="ls -l"
alias la='ls -A'
alias less="less -R"
#bundle
alias b="bundle exec"
# git
alias gpl='git pull'
alias gplr='git pull --rebase'
alias gp='git push'
alias gd='git diff'
alias gc='git commit'
alias gca='git commit -a'
alias gco='git checkout'
alias gb='git branch'
alias gs='git status'
alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm"
alias gchangelog='git log `git log -1 --format=%H -- CHANGELOG*`..; cat CHANGELOG*'
alias grollback='git reset --soft HEAD~1'
# rails
alias renv='echo $RAILS_ENV'
alias renv_dev='export RAILS_ENV=development'
alias renv_test='export RAILS_ENV=test'
alias rc='rails console'
alias rs='rails server'
alias rg='rails generate'
alias rlog='tail -f log/development.log'
alias rmigrate='rake db:migrate'
~/Desktop/dfms-rails[master]% renv
development
~/Desktop/dfms-rails[master]% renv_test
~/Desktop/dfms-rails[master]% renv
test
~/Desktop/dfms-rails[master]% b rspec .
Run options:
include {:focus=>true}
exclude {:broken=>true, :wip=>true}
All examples were filtered out; ignoring {:focus=>true}
.......
Finished in 0.54134 seconds
7 examples, 0 failures
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment