-
Notifications
You must be signed in to change notification settings - Fork 4
/
.profile
242 lines (195 loc) · 7.42 KB
/
.profile
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# Git Vars
export GITHUB_USERNAME='aaronzirbes'
# Add homebrew to path
export PATH="/usr/local/bin::$PATH"
# Add my bin folder to path
export PATH="$HOME/bin:/usr/local/sbin:$PATH"
# Adding ruby gems to path
export PATH="/usr/local/Cellar/ruby/1.9.3-p362/bin:$PATH"
#o Adding NPM to path
export PATH="/usr/local/share/npm/bin:$PATH"
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
### Added by Pyhon pipenv
export PATH="$HOME/Library/Python/3.6/bin:$PATH"
# Homebrew
export HOMEBREW_PREFIX="/opt/homebrew";
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
export HOMEBREW_REPOSITORY="/opt/homebrew";
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin${PATH+:$PATH}";
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
# ctags
export CTAGS='-f ./.tags --exclude=.git --exclude=node_modules --exclude=build'
# grep colors
export GREP_COLOR='1;31'
export GREP_OPTIONS='--color=auto'
# LS Colors
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Consul
#export CONSUL_HOST='localhost'
#export CONSUL_PORT='8500'
#export CONSUL_URI='http://localhost:8500'
#export VAULT_URI='http://localhost:8200'
#export VAULT_TOKEN='default-token'
# From brew install mono
export MONO_GAC_PREFIX="/usr/local"
. $HOME/.files/vim_dev.sh
#export JAVA_HOME="${HOME}/.sdkman/candidates/java/current"
# JDK 8
# export JAVA_OPTS='-Djava.awt.headless=true -Xms1536m -Xmx1536m -XX:+UseConcMarkSweepGC'
# export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/'
# JDK 9
# export JAVA_OPTS='-Djava.awt.headless=true -Xms1536m -Xmx1536m'
# export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/'
# JDK11
# export JAVA_OPTS='-Djava.awt.headless=true -Xms2G -Xmx2G'
# export JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk-11+28/Contents/Home/'
launchctl setenv JAVA_HOME "${JAVA_HOME}"
export GOPATH="$HOME/dev/go"
# Add Golang to path
export PATH="$GOPATH/bin:$PATH"
alias ll='ls -l'
alias getopt="$(brew --prefix gnu-getopt)/bin/getopt"
alias ghb='gh browse'
alias nv=nvim
# alias gremlin='~/dse/bin/dse gremlin-console'
alias ubuntu='docker run -i -t ubuntu:14.04 bash'
alias uuid="uuidgen |tr '[:upper:]' '[:lower:]'"
alias cdcl="cd ~/i/clusters/"
alias cdto="cd ~/i/topics/"
alias format="gradle spotlessApply"
alias vimrc='nv ~/.vim/vimrc'
alias docker-start='colima start'
alias dcd='docker-compose down'
alias dcu='docker-compose up -d'
alias grc='gradle --continuous'
alias cat='bat'
alias top='htop'
alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules"
alias pyserve='python -m http.server'
alias mast='git co master'
function pods() {
on=$'\e[1;49;37m'
green=$'\e[1;49;32m'
red=$'\e[1;49;31m'
yellow=$'\e[1;49;33m'
off=$'\e[m'
kubectl get pods | \
sed -e "s/[[:blank:]]\([0-9]*[1-9][0-9]*\)[[:blank:]]/ $red\1$off /g" \
-e "s/\(ContainerCreating\)/$yellow\1$off/g" \
-e "s/\(Running\)/$green\1$off/g" \
-e "s/\(Terminating\)/$red\1$off/g" \
-e "s/\(CrashLoopBackOff\)/$red\1$off/g" \
-e "s/\(Error\)/$red\1$off/g" \
-e "s/\(0\/1\)/$red\1$off/g" \
-e "s/[[:blank:]]\([0-9][0-9]*s\)/ $red\1$off /g" \
-e "s/[[:blank:]]\([0-9][0-9]*m\)/ $yellow\1$off /g" \
-e "s/[[:blank:]]\([0-9][0-9]*h\)/ $green\1$off /g" \
-e "s/[[:blank:]]\([0-9][0-9]*d\)/ $green\1$off /g"
}
function g-findword() {
grep --include '*.java' --include '*.groovy' --include '*.gsp' --include '*.gradle' -rE "\<${1}\>" .
}
function j-findword() {
grep --include '*.js' --include '*.html' --include '*.css' -rE "\<${1}\>" .
}
function promptEmoji() {
export simple_arrow='→'
export simple_fail='!'
export fancy_arrow='➦'
export fancy_fail='✘'
export beer='🍺 '
export shamrock='☘️ '
export wine='🍷 '
export coffee='☕ '
export cat='😺 '
export lamp='🪔 '
export leaves_fall='🍂 '
export jack_o_lantern='🎃 '
export move_right='\e[1C'
export snowflake='❄️ '
now_hour=`date +%H|sed -e 's/^0//'`
if (( $now_hour < 16 )); then
echo -n $coffee
else
echo -n $shamrock
fi
}
function configurePrompt() {
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
if [ -f "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" ]; then
#GIT_PROMPT_THEME=Default
GIT_PROMPT_THEME=Solarized
# GIT_PROMPT_START=... # uncomment for custom prompt start sequence
if [ "$VIMRUNTIME" != "" ]; then
# Neo vim has an odd alignment issue in the terminal emulator for the beer/wine/coffee character
GIT_PROMPT_END='\e[1;34m $(promptEmoji) `date`\e[0m\n\e[1;32mVim $\e[0m '
else
GIT_PROMPT_END='\e[1;34m $(promptEmoji) `date`\e[0m\n$ '
fi
# as last entry source the gitprompt script
# GIT_PROMPT_THEME=Custom # use custom .git-prompt-colors.sh
# GIT_PROMPT_THEME=Solarized # use theme optimized for solarized color scheme
source "$(brew --prefix bash-git-prompt)/share/gitprompt.sh"
fi
# Seeing: "sed: RE error: illegal byte sequence" here...
source "$(brew --prefix bash-completion)/etc/bash_completion"
}
configurePrompt
export DOCKER_IP=127.0.0.1
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
export DOCKER_HOST="unix://${HOME}/.colima/docker.sock"
function useZirbesAwsCreds() {
if [ -r $HOME/dev/zirbes.awscreds ]; then
echo "Using aaronzirbes AWS Creds"
source $HOME/dev/zirbes.awscreds
fi
}
function configureAwsCreds() {
# Source AWS Creds
useZirbesAwsCreds
export EC2_AMITOOL_HOME="/usr/local/Cellar/ec2-ami-tools/1.5.3/libexec"
export EC2_HOME="/usr/local/Cellar/ec2-api-tools/1.7.1.0/libexec"
}
export ANDROID_SDK_HOME="${HOME}/dev/android/sdk/24.3.3/android-sdk-macosx"
set -o vi
# Java Environment manager
if which jenv > /dev/null; then eval "$(jenv init -)"; fi
#jenv global 1.8
# Installed SDK Man via:
# curl -s get.sdkman.io | bash
# Sourcing chruby
#. /usr/local/share/chruby/chruby.sh
# Using ruby 2.2.3
#chruby ruby-2.2.3
# Source Target stuffs
. $HOME/bin/tgt_vars
export ANDROID_HOME=/usr/local/share/android-sdk
export BASH_SILENCE_DEPRECATION_WARNING=1
export TMPDIR=`mktemp -d -t ajztemp`
chown -R `whoami` $TMPDIR
launchctl setenv TMPDIR "${TMPDIR}"
# Python
#export CFLAGS="-I$(brew --prefix openssl)/include $CFLAGS"
#export LDFLAGS="-L$(brew --prefix openssl)/lib $LDFLAGS"
export PYENV_ROOT="$HOME/.pyenv"
eval "$(pyenv init -)"
eval "$(ssh-agent -s)" >> /dev/null
export EDITOR=nvim
export NVM_DIR="$HOME/.nvm"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="${HOME}/.sdkman"
[ -s "${HOME}/bin/.local_profile" ] && source "${HOME}/bin/.local_profile"
[ -s "${HOME}/.sdkman/bin/sdkman-init.sh" ] && source "${HOME}/.sdkman/bin/sdkman-init.sh"
[ -e "${HOME}/.iterm2_shell_integration.bash" ] && source "${HOME}/.iterm2_shell_integration.bash"
[ -f /usr/local/etc/profile.d/autojump.sh ] && source /usr/local/etc/profile.d/autojump.sh
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
[ -e /usr/local/share/git-fuzzy ] && export PATH="/usr/local/share/git-fuzzy/bin:$PATH"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# For pairing
#cd /Users/Z002S5D/dev/pairing/price-calculator