Permalink
Browse files

Cleaned up Ruby stuff in anticipation of serious RoR work.

  • Loading branch information...
1 parent 8016022 commit f08d7f5657cf366e73078a89d5413fdfe328aeaf @ggamel committed Jan 15, 2013
Showing with 92 additions and 23 deletions.
  1. +4 −0 ruby/aprc.symlink
  2. +20 −0 ruby/completion.zsh
  3. +10 −1 ruby/gemrc.symlink
  4. +0 −22 ruby/rails.zsh
  5. +17 −0 ruby/rbenv.zsh
  6. +41 −0 ruby/ruby.zsh
View
@@ -0,0 +1,4 @@
+AwesomePrint.defaults = {
+ indent: 2,
+ sort_keys: true
+}
View
@@ -0,0 +1,20 @@
+# Taken from https://github.com/sstephenson/rbenv/blob/master/completions/rbenv.zsh
+
+if [[ ! -o interactive ]]; then
+ return
+fi
+
+compctl -K _rbenv rbenv
+
+_rbenv() {
+ local words completions
+ read -cA words
+
+ if [ "${#words}" -eq 2 ]; then
+ completions="$(rbenv commands)"
+ else
+ completions="$(rbenv completions ${words[2,-1]})"
+ fi
+
+ reply=("${(ps:\n:)completions}")
+}
View
@@ -1 +1,10 @@
-gem: --ri --no-rdoc
+---
+:update_sources: true
+:verbose: true
+:bulk_threshold: 1000
+:backtrace: false
+:benchmark: false
+:ssl_verify_mode: 0
+gem: --no-rdoc --no-ri
+install: --no-rdoc --no-ri
+update: --no-rdoc --no-ri
View
@@ -1,22 +0,0 @@
-alias assets="rake assets:precompile RAILS_ENV=development RAILS_ASSETS_NONDIGEST=true"
-alias killpg="ps xa | grep postgres: | grep purecharity | grep -v grep | awk '{print $1}' | xargs kill"
-
-alias autocuke='AUTOFEATURE=true autotest'
-
-alias cgj="find tmp/capybara | tail -1 | xargs open"
-alias tl='tail -f log/development.log'
-alias tts="touch tmp/restart.txt"
-alias fs="foreman start"
-alias ri='ri -f ansi'
-
-
-function bbu() {
- if [[ -z $1 ]]; then
- UNICORN_PORT=3000;
- else
- UNICORN_PORT=$1;
- fi
- bundle exec unicorn -E development -c /usr/local/etc/unicorn.rb -l 127.0.0.1:$UNICORN_PORT
-}
-
-
View
@@ -0,0 +1,17 @@
+# rehash shims
+rbenv rehash 2>/dev/null
+
+# shell thing
+rbenv() {
+ command="$1"
+ if [ "$#" -gt 0 ]; then
+ shift
+ fi
+
+ case "$command" in
+ shell)
+ eval `rbenv "sh-$command" "$@"`;;
+ *)
+ command rbenv "$command" "$@";;
+ esac
+}
View
@@ -0,0 +1,41 @@
+# Taken from https://github.com/adamyonk/dotfiles ;)
+
+# Load rbenv
+#eval "$(rbenv init -)"
+
+# # Load chruby
+# source /usr/local/share/chruby/chruby.sh
+# source /usr/local/share/chruby/auto.sh
+# chruby 1.9.3
+
+# Load unicorn
+#function bbu() {
+# if [[ -z $1 ]]; then
+# UNICORN_PORT=3000;
+# else
+# UNICORN_PORT=$1;
+# fi
+# bin/unicorn -E development -c /usr/local/etc/unicorn.rb -1 127.0.0.1:$UNICORN_PORT
+#}
+
+alias rake='noglob rake'
+alias bundle='noglob bundle'
+alias be='bundle exec'
+alias bi='bundle install'
+alias fr='bundle exec foreman run bundle exec'
+
+#alias killall=exec "kill -QUIT $(ps aux | grep "postgres\|redis\|mailcatcher\|sphinx\|unicorn" | awk '{print $2}' | xargs)"
+
+# This might not be good to have on non-dev machines
+#export RUBY_HEAP_MIN_SLOTS=1000000
+#export RUBY_HEAP_SLOTS_INCREMENT=1000000
+#export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
+#export RUBY_GC_MALLOC_LIMIT=1000000000
+#export RUBY_HEAP_FREE_MIN=500000
+
+alias pg-up='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log'
+alias nginx-up="sudo nginx -c /usr/local/etc/nginx/nginx.conf"
+alias nginx-down="sudo nginx -s stop"
+alias redis-up='redis-server /usr/local/etc/redis.conf > /dev/null &'
+alias redis-down='killall redis-server'
+alias pc_precompile='bundle exec rake assets:precompile RAILS_ENV=development RAILS_ASSETS_NODIGEST=true'

0 comments on commit f08d7f5

Please sign in to comment.