Last active
August 29, 2015 14:20
-
-
Save justin808/404b40977550759dc28f to your computer and use it in GitHub Desktop.
Rails Zsh Scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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