Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rails Zsh Scripts
# Kill stuff
pgr() {
for x in rake spring rails ruby-debug phantomjs zeus passenger guard resque "node server.js"; do
pgrep -fl $x;
done
}
pgk() {
for x in rake spring rails ruby-debug phantomjs zeus passenger guard resque "node server.js"; do
pkill -fl $x;
done
}
pgkk() {
for x in rake spring rails ruby-debug phantomjs zeus passenger guard resque "node server.js"; do
pkill -9 -fl $x;
done
}
export DEFAULT_RUBY=ruby-2.2.1
export DEFAULT_GEMSET=rails42
create_ruby() {
RUBY_VERSION=${1-${DEFAULT_RUBY}}
RUBY_GEMSET=${2-${DEFAULT_GEMSET}}
echo $RUBY_VERSION >| .ruby-version
echo $RUBY_GEMSET >| .ruby-gemset
cd ..
cd -
echo "Created .ruby-version and .ruby_gemset. Version: '$RUBY_VERSION', gemset: '$RUBY_GEMSET'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.