Created
January 18, 2016 23:02
-
-
Save fimmtiu/85a873ee465150f56c03 to your computer and use it in GitHub Desktop.
fimmtiu's .bashrc file
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
# Environment variables | |
export PATH="$HOME/.rbenv/bin:$PATH:$HOME/bin:$HOME/themis/script" | |
if command -v rbenv >/dev/null; then | |
eval "$(rbenv init -)" | |
fi | |
export ARCHFLAGS="-arch x86_64" | |
export VISUAL=/Applications/Emacs.app/Contents/MacOS/bin/emacsclient | |
export EDITOR=$VISUAL | |
export LESS="FRX" | |
# Ruby 2.x memory settings suitable for a development environment. | |
export RUBY_GC_HEAP_INIT_SLOTS="610987" | |
export RUBY_GC_HEAP_FREE_SLOTS="308945" | |
export RUBY_GC_HEAP_GROWTH_FACTOR="1.03" | |
export RUBY_GC_HEAP_GROWTH_MAX_SLOTS="298092" | |
export RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR="2.0" | |
export RUBY_GC_MALLOC_LIMIT="33075564" | |
export RUBY_GC_MALLOC_LIMIT_MAX="69458684" | |
export RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR="1.68" | |
export RUBY_GC_OLDMALLOC_LIMIT="45895738" | |
export RUBY_GC_OLDMALLOC_LIMIT_MAX="96381050" | |
export RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR="1.4" | |
# This is for Resque signal handling. | |
export TERM_CHILD=1 | |
# This tells Clio to save an HTML copy of the last PDF it generated in /tmp. | |
export SAVE_PDF_HTML=true | |
export XERO_KEY=BLARGH | |
export XERO_SECRET=HONK | |
export GOPATH=~/go | |
# Git configuration | |
alias g="git" | |
complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null || complete -o default -o nospace -F _git g | |
function _git_origin_push() { _git_checkout; } # Tab completion for "git op" branch names | |
alias h="hub" | |
alias hm="hub merge --no-ff" | |
# Other aliases | |
alias top="top -o cpu" | |
alias be="bundle exec" | |
alias rake="bundle exec rake" | |
alias z="zeus" | |
alias zr="zeus rspec" | |
alias zc="zeus console" | |
alias zk="zeus rake" | |
alias ec="$VISUAL -n" | |
alias drc="rails console" | |
alias irc="(cd ~/iris; rails console)" | |
alias diff="colordiff" | |
alias ls="ls -F" | |
alias hist="history | grep" | |
alias db-save="mysqldump --host=localhost --user=root themis_development > /tmp/dev.sql && mysqldump --host=localhost --user=root iris_development > /tmp/iris.sql" | |
alias db-load="dsql < /tmp/dev.sql && isql < /tmp/iris.sql" | |
alias db-reset='bundle exec rake db:drop db:create db:migrate && bundle exec rake db:seed && restart-memcache || echo '\''failed'\''' | |
alias db-reset-test='RAILS_ENV=test bundle exec rake db:drop db:create db:migrate || echo '\''failed'\''' | |
alias dsql="mysql --host=localhost --user=root themis_development" | |
alias tsql="mysql --host=localhost --user=root themis_test" | |
alias isql="mysql --host=localhost --user=root iris_development" | |
alias tables="echo 'SHOW TABLES;' | dsql | grep" | |
alias deploy="bundle exec cap production deploy && tn 'Deployment finished.' && bundle exec cap production-eu deploy && bundle exec cap staging deploy" | |
alias clear-xero="echo 'delete from consumer_tokens; delete from syncable_connectors; delete from syncable_links ; delete from xero_accounts; delete from sync_failures;' | dsql" | |
alias async="ssh dennis.taylor@async02.sc.goclio.com" | |
alias web="ssh dennis.taylor@web02.sc.goclio.com" | |
alias webeu="ssh dennis.taylor@web02.ec2.goclio.eu" | |
alias webd="ssh dennis.taylor@web.dev.sc.goclio.com" | |
alias tn="terminal-notifier -sound Basso -message" | |
alias ag="ag --color-line-number '1;36'" | |
alias wag="wipe; ag" | |
alias unfuck-angular="rm -rf node_modules public/assets/* && bundle install && npm install && rake tmp:cache:clear browserify:generate_index" | |
desc() { echo "DESC $1;" | dsql -t; } | |
# Miscellaneous stuff | |
ulimit -c unlimited | |
export HISTCONTROL=ignoredups:ignorespace | |
shopt -s histappend | |
shopt -s checkwinsize | |
export PS1='\u@\h \w\$ ' | |
unset color_prompt force_color_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment