Skip to content

Instantly share code, notes, and snippets.

@matthutchinson
Created September 20, 2010 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthutchinson/588044 to your computer and use it in GitHub Desktop.
Save matthutchinson/588044 to your computer and use it in GitHub Desktop.
.bash_aliases
# launching console/server
sc () {
if [ -f ./script/rails ]; then
rails c $@
else
./script/console $@
fi
}
sg () {
if [ -f ./script/rails ]; then
rails g $@
else
./script/generate $@
fi
}
ss () {
if [ -f ./script/rails ]; then
rails s $@
else
./script/server $@
fi
}
sspe () {
if [ -f ./script/rails ]; then
sudo rails s -p80 $@
else
sudo ./script/server -p80 $@
fi
}
# database migrate
alias rdbm='rake db:migrate'
# tests
alias rsp='rake spec'
# rails logs, tailing and cleaning
alias tdl='tail -f ./log/development.log'
alias ttl='tail -f ./log/test.log'
alias ctl='> ./log/test.log'
alias cdl='> ./log/development.log'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment