Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
.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