-
Notifications
You must be signed in to change notification settings - Fork 0
/
my.zshrc
337 lines (286 loc) · 11.5 KB
/
my.zshrc
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Uncomment this to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment following line if you want to shown in the command execution time stamp
# in the history command output. The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|
# yyyy-mm-dd
# HIST_STAMPS="mm/dd/yyyy"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
export GOPATH="/Users/robbecker/go"
export DART_SDK="/Users/robbecker/dart/dart-sdk/"
#export DART_SDK="/Users/robbecker/downloads/dart/dart-sdk/" # dev channel
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH="/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/go/bin:$GOPATH/bin:/Users/robbecker/bin:/Users/robbecker/android-sdk/platform-tools:/Users/robbecker/android-sdk/tools:$DART_SDK/bin:/Users/robbecker/google-cloud-sdk/bin:./node_modules/.bin:/Users/robbecker/.pub-cache/bin"
# Enable remote debugging in PyCharm -lrf 12/4/2014
export PYTHONPATH='/Applications/PyCharm.app/Contents/debug-eggs/pycharm-debug.egg'
export CFLAGS="-Qunused-arguments"
export CPPFLAGS="-Qunused-arguments"
#To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.59.103:2376
export DOCKER_CERT_PATH=/Users/robbecker/.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
# # Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
###########################
# Add virtualenvwrapper
export WORKON_HOME=~/Envs
# Sources the virtualenvwrapper so all the commands are availabe in the shell
source /usr/local/bin/virtualenvwrapper.sh
export MAVEN_OPTS="-Xmx4096m -Xss1024m"
# iOS Simulator dir
export SIM_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
# Bower & npm aliases
alias bl="bower link"
alias lsbc='ls bower_components'
alias lsnm='ls node_modules'
alias lspk='ls packages'
alias bower='noglob bower'
alias blall='blcmn && blui && blvw && blann && bl wDOM && lsbc'
alias blui='bower link wf-uicomponents'
alias blvw='bower link wf-js-viewer'
alias blann='bower link wf-js-annotations'
alias blcmn='bower link wf-common'
alias lsbowerlinks='ls -al ~/.local/share/bower/links'
alias rebower='rm -rf bower_components/ && bower install'
alias renpm='rm -rf node_modules/ && npm install'
alias rejs="renpm && rebower"
alias rm='rm -rf'
# cd to directories
alias wet='cd ~/workspace/wErrorTrack'
alias dv='cd ~/workspace/wf-js-document-viewer'
alias wdom='cd ~/workspace/wDOM'
alias bs='cd ~/workspace/bigsky'
alias sc='cd ~/workspace/server_composition'
alias ui='cd ~/workspace/wf-uicomponents'
alias ann='cd ~/workspace/wf-js-annotations'
alias bsrv='cd ~/workspace/bigsky/apps/rv'
alias books='cd ~/workspace/wf-books'
alias boks='cd ~/workspace/bigsky/books'
alias rv='cd ~/workspace/wf-js-reference-viewer'
alias vs='cd ~/workspace/wf-viewer-services'
alias vw='cd ~/workspace/wf-js-viewer'
alias wv='cd ~/workspace/wViewer'
alias paw='cd ~/workspace/paw'
alias cmn='cd ~/workspace/wf-common'
alias wglp='cd ~/workspace/wGulp'
alias prs='cd ~/workspace/python-runtime-stack'
alias dl="cd ~/Downloads"
alias work='cd ~/workspace'
alias play='cd ~/play'
alias chromehome="cd ~/Library/Application\ Support/Google/Chrome/Default"
alias cdbowerlinks='cd ~/.local/share/bower/links'
# git aliases
alias lasttag="git describe --tags --abbrev=0"
alias gsl="git stash list"
alias gsp="git stash pop"
alias gsc="git stash clear"
alias gs="git stash"
alias gsu="git submodule update --init"
alias gf="git fetch"
alias gmm="git merge -s recursive -X patience -X ignore-all-space origin/master"
alias gmmm="git fetch main && git merge -s recursive -X patience -X ignore-all-space main/master"
alias gitwork="cp ~/.ssh/work.config ~/.ssh/config && cp ~/work.gitconfig ~/.gitconfig"
alias gitrob="cp ~/.ssh/rob.config ~/.ssh/config && cp ~/rob.gitconfig ~/.gitconfig"
alias cleanbranches='~/bin/cleanbranches.sh'
# Bigsky aliases
alias skyup="bs && git pull && git submodule update --init && workon sky && pip install -r requirements_dev.txt"
alias nobs="killall python -SIGINT"
alias killbs="killall python"
alias repip='bs && workon sky && pip install -r requirements_dev.txt'
alias bsant='\
bs && \
SUPPORTPATH=$HOME/workspace/support && \
cp build-user.properties.mac build-user.properties && \
sed -E -i .bak -e "s%SUPPORT=(.+)%SUPPORT=$SUPPORTPATH%" build-user.properties && \
cp settingslocal.py.dev settingslocal.py && \
workon sky && \
ant full'
alias bsmyaccount="echo Rob,Becker,rob,go,,Workiva,[email protected],666-666-6667,555-555-5556,444-444-4445,333-333-3334,2131 North Loop Drive,,,Ames,IA,50011 > ~/workspace/bigsky/tools/bulkdata/accounts.csv"
alias bslinkdocviewerassets='bs && workon sky && ./tools/link_assets.py sky.docviewer assets'
alias piplink_dv='bs && workon sky && rm -rf ./static/sky-docviewer && mkdir ./static/sky-docviewer && \
{ pip uninstall -y sky-docviewer; pip install -e ../wf-js-document-viewer; } && \
ant link-libs && \
bslinkdocviewerassets'
alias piplink_sc='bs && workon sky && { pip uninstall -y server_composition; pip install -e ../server_composition; }'
alias piplink_vs='bs && workon sky && { pip uninstall -y wf-viewer-services; pip install -e ../wf-viewer-services; }'
alias piplink_as='bs && workon sky && { pip uninstall -y wf-annotation-services; pip install -e ../wf-annotation-services; }'
alias piplink_books='bs && workon sky && { pip uninstall -y wf-books; pip install -e ../wf-books; } && ant link-libs && ./tools/link_assets.py wf.apps.books assets'
alias piplink_all='piplink_vs && piplink_sc && piplink_docviewer && piplink_as'
alias bsdocviewerinstall='bslinkdocviewerassets && bsdocviewerpip'
alias resetdata='bsmyaccount && bs && workon sky && rm -rf datastore && mkdir datastore && python tools/erase_reset_data.py --use_sqlite --admin="rob" --password="go" --enabled_settings=enable_presentations,enable_doc_viewer,enable_two_column'
alias bslog="tail -f /tmp/bs.log"
alias dsback="bs && rm -rf ~/ds/datastore && cp -R datastore ~/ds"
alias mockssc="python server_composition/test_utilities/mock_service/main.py"
# Alias all the things
alias pfz='bs && workon sky && pip freeze'
alias deac='[[ -n $VIRTUAL_ENV ]] && deactivate'
alias mvext="for i in *.ts ; do mv $i ${i:r}.dart ; done"
alias ln='ln -s'
alias ls='ls -alG'
alias st='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias subl='st'
alias reload='. ~/.zshrc'
alias zshrc='subl ~/.zshrc'
alias mate='st'
alias loc='find . -name $1 2>/dev/null'
alias glp='gulp'
alias showlinks='ls -lR . | grep ^l'
alias findlinks='find -L . -type l'
alias b2d='boot2docker'
alias dockup="boot2docker stop && boot2docker download && boot2docker up"
alias jsinit="git clean -fxd && npm install && bower install"
[ -s "/Users/robbecker/.scm_breeze/scm_breeze.sh" ] && source "/Users/robbecker/.scm_breeze/scm_breeze.sh"
# ADB
alias adbrecord="adb shell screenrecord /sdcard/recording.mp4"
alias adbpullrecording="adb pull /sdcard/recording.mp4"
alias adbwear="adb -d forward tcp:5601 tcp:5601"
alias adbbtwear="adb forward tcp:4444 localabstract:/adb-hub; adb connect localhost:4444"
# Appspot stuff
alias bsdeploy="bs && workon sky && rm -rf external_libs/functional_tests && bsdeploy.sh"
# convert a mov to animated gif
alias mov2gif="ffmpeg -i in.mov -s 640x480 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif"
alias passit="runscope-passageway --bucket=17oi37jseh6z --fixed 8001"
alias nopass="killall runscope-passageway"
alias sad="open 'http://www.sadtrombone.com/?autoplay=true'"
alias dartium="/Users/robbecker/dart/chromium/Chromium.app/Contents/MacOS/Chromium"
alias pg="pub get"
alias pb="pub build"
alias pup="pub upgrade"
alias repub="rm -rf packages ~/.pub-cache && pub cache repair && pub get"
## functions
revenv() {
deac
rm -rf /Users/robbecker/Envs/sky
bs
mkvirtualenv sky -a /Users/robbecker/workspace/bigsky
}
nvsup() {
local workerTag="latest"
local managerTag="latest"
if [[ $1 != "" ]]; then
workerTag="$1"
managerTag="$1"
fi
if [[ $2 != "" ]]; then
managerTag="$2"
fi
echo Using worker $workerTag manager $managerTag
b2d up
# # Run the NVS Task Manager
docker stop nvs-task-manager
docker stop nvs-worker
docker rm nvs-task-manager
docker rm nvs-worker
docker pull docker.webfilings.org/hydra/nvs-task-manager:"$managerTag"
docker pull docker.webfilings.org/hydra/nvs-worker:"$workerTag"
docker run -t -d -p 49444:49444 --name nvs-task-manager -e "DEMETER_CONF=-l DEBUG" docker.webfilings.org/hydra/nvs-task-manager:"$managerTag"
docker run -d --name nvs-worker --link nvs-task-manager:nvs-task-manager -e "DEMETER_CONF=-l DEBUG" docker.webfilings.org/hydra/nvs-worker:"$workerTag"
docker start nvs-task-manager
docker start nvs-worker
docker ps
}
dsrest() {
nobs
sleep 1
echo Restoring datastore
cp -R ~/ds/datastore datstore
by
}
bsfonts() {
bs
workon sky
echo fakepassword | python tools/remote_api/upload_font.py ../font/fonts/general --wf-enable --email=junk --passin --skip-check
echo fakepassword | python tools/remote_api/upload_font.py ../font/fonts/embedded_in_editor --wf-enable --email=junk --passin --skip-check
echo fakepassword | python tools/remote_api/upload_font.py ../font/fonts/restricted --wf-enable --email=junk --passin --skip-check
}
rebs() {
nobs
bs
gcm -f
git clean -fxd
revenv
bsmyaccount
bs
skyup
bsant
resetdata
by
sleep 5
bsfonts
say Done with all the bullshit
}
redv() {
nobs
dv
rejs
grunt
piplink_dv
by
say D V ready
}
rebolt() {
cd ~/workspace/bolt
deactivate
rmvirtualenv bolt
rm -rf server/lib
mkvirtualenv bolt -a server
workon bolt
cd server
pip install -r requirements_dev.txt
export PYTHONPATH=/usr/local/google_appengine
link_libs -d lib -r requirements.txt
nosetests
}
by() {
if [[ $(ps | grep "manage.py runserver 0.0" -c) -lt 2 ]]; then
echo Starting Bigsky
bs
workon sky
if [[ $1 == "" ]]; then
(python manage.py runserver 0.0.0.0:8001 --use_sqlite 2>&1) > /tmp/bs.log &
deactivate
else
python manage.py runserver 0.0.0.0:8001 --use_sqlite
fi
else
echo Already running
fi
}