-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_prodis
More file actions
112 lines (90 loc) · 3.89 KB
/
bash_prodis
File metadata and controls
112 lines (90 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# ----------------------------------------
# Prodis' configuration
# ----------------------------------------
# Ensure that the /usr/local/bin path is before /usr/bin
export PATH=/usr/local/bin:$PATH
# MySQL
export PATH=/usr/local/mysql/bin:$PATH
# export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
# Curl installed via Homebrew
export PATH=/usr/local/opt/curl/bin:$PATH
# Python 2
# This formula is keg-only, which means it was not symlinked into /usr/local,
# because this is an alternate version of another formula.
#
# If you need to have this software first in your PATH run:
# export PATH="/usr/local/opt/python@2/bin:$PATH"
# Add RVM to PATH for scripting
export PATH="$PATH:$HOME/.rvm/bin"
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Git
source ~/.git_completion.sh
# Bash with Git branch (no RVM)
# export PS1='\[\033[35m\]\u\[\033[33m\] \w \[\033[36m\]`~/.rvm/bin/rvm-prompt i v`\[\033[31m\] `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[33m\]$\[\033[00m\] '
# export PS1='\[\033[35m\]|>\[\033[33m\] \w \[\033[36m\]`~/.rvm/bin/rvm-prompt v`\[\033[31m\] `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[34m\]$\[\033[00m\] '
# export PS1='\[\033[33m\] \w \[\033[36m\]`~/.rvm/bin/rvm-prompt v`\[\033[31m\] `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[34m\]$\[\033[00m\] '
# export PS1='🏀 \[\033[33m\] \w \[\033[36m\]`~/.rvm/bin/rvm-prompt v`\[\033[31m\] `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[34m\]$\[\033[00m\] '
# No more ruby version:
export PS1='🏀 \[\033[33m\] \w \[\033[35m\]`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\[\033[34m\]$\[\033[00m\] '
# Basketball symbol
# 🏀
# iTerm
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
# Homebrew Bash Completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# Bash Shortcuts
alias ls='ls -G'
alias ll='ls -la'
alias rmswp='find . -name *.swp | xargs rm'
alias xx='exit'
alias x='echo Eis que surge o X da questão...'
alias hiddenfilesyes='defaults write com.apple.Finder AppleShowAllFiles YES'
alias hiddenfilesno='defaults write com.apple.Finder AppleShowAllFiles NO'
# Rails
alias rc='rails console'
alias rs='rails server'
alias rg='rails generate'
alias rr='rails runner'
alias bx='bundle exec'
alias rake='bx rake'
alias dcmdev="RAILS_ENV=development rake db:drop db:create db:migrate"
alias dcmtest="RAILS_ENV=test rake db:drop db:create db:migrate"
# Servers
alias run-postgres='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
alias stop-postgres='pg_ctl -D /usr/local/var/postgres stop'
alias run-rabbit='/usr/local/sbin/rabbitmq-server'
alias run-redis='/usr/local/bin/redis-server'
# Go
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/work/go
export PATH=$PATH:$GOPATH/bin
alias gopath='cd $GOPATH'
alias gobin='cd $GOPATH/bin'
alias gopkg='cd $GOPATH/pkg/darwin_amd64/github.com/prodis'
alias gosrc='cd $GOPATH/src/github.com/prodis'
# Elixir
export ERL_AFLAGS='-kernel shell_history enabled'
alias is='iex -S mix'
alias mt='mix test'
alias mtt='mix test --trace'
# MySQL
alias ms='mysql -uroot'
# ----------------------------------------
# Prodis' work
# ----------------------------------------
# Ruby Gems
export GEMSPATH=$HOME/work/gems
alias cep='cd $GEMSPATH/correios-cep'
alias frete='cd $GEMSPATH/correios-frete'
alias sro='cd $GEMSPATH/correios-sro-xml'
alias httpme='cd $GEMSPATH/http_me'
alias logme='cd $GEMSPATH/log-me'
alias labeled='cd $GEMSPATH/rails-labeled_log'
alias bool='cd $GEMSPATH/wannabe_bool'
# Prodis
export PRODISPATH=$HOME/work/prodis
alias dotfiles='cd $PRODISPATH/dotfiles'
alias vimfiles='cd $PRODISPATH/vimfiles'