-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc.local
226 lines (162 loc) · 6.79 KB
/
.zshrc.local
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
export PATH="$PATH:/usr/local:/usr/local/bin:/opt/local/share/texmf-texlive/dvips/base:/bin:/usr/texbin:/Users/jchevall/bin:/Users/jchevall/bc99lx/bc03/src:/Users/jchevall/bc99lx/Mock:/Users/jchevall/bc99lx/is_97:/Users/jchevall/MILLENNIUM:/Users/jchevall/IDL:/Users/jchevall/idlutils/bin:/Applications/rsi/idl/bin:/Users/jchevall/TeX:/opt/openmpi/bin:opt/local/bin:/Users/jchevall/Bin:/Users/jchevall/profilers/TAU/apple/bin:/Users/jchevall/bin/wcstools-3.9.5"
export PATH="/Users/jchevall/anaconda3/bin:/usr/local/bin:/usr/local/Cellar/open-mpi/2.0.1/lib:/usr/local/Cellar/open-mpi/2.0.1/include:/Library/Frameworks/Python.framework/Versions/3.6/bin:$PATH"
# Avoid shared history
unsetopt share_history
export SAVEHIST=10000
# Skygo
alias SkyGo_reset="\rm /Users/jchevall/Library/Application\ Support/Sky\ Go/qgd-redux-auth.json"
# TOPCAT
alias topcat="java -Xmx1024M -jar /Applications/TOPCAT.app/Contents/Resources/Java/topcat-full.jar"
# Syntax highlighting
export LSCOLORS="gxfxcxdxfxegedabagacad"
alias lsdir="ls -ltr -d */"
# Sonos
alias airsonos="n use 0.10.28 /usr/local/bin/airsonos"
# GNU sed
alias sed="gsed"
# Further syntax coloring with zprezto (see /Users/jchevall/.zprezto/modules/syntax-highlighting/README)
ZSH_HIGHLIGHT_STYLES[globbing]='none'
# Use OpenBLAS with a single thread
export OPENBLAS_NUM_THREADS=1
# Avoid creation of spurious files when creating tar archive on a Mac OSX
export COPYFILE_DISABLE=true
# Default editor
export EDITOR="vim"
export VISUAL=vim
export EDITOR="$VISUAL"
# Python - Homebrew related stuff
export GDK_PIXBUF_MODULEDIR="/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
export GTK_PATH="/usr/local/lib/gtk-2.0"
export HOMEBREW_GITHUB_API_TOKEN="7de96236b5b619d6e70682138ddb016c2eddad0a"
export CHANGELOG_GITHUB_TOKEN="86fba8baa15053e40cfd05c39af97e1345b6ffea"
alias push_docs="git add -u ; git commit -m \"Updated docs\" ; git push origin master"
alias gittag="git for-each-ref --sort=taggerdate --format '%(refname)' refs/tags"
export PYTHONPATH="/usr/local/lib/python2.7/site-packages:/Users/jchevall/python:/Users/jchevall/JWST/code"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
export JWSTPYTOOLS="/Users/jchevall/JWST/code/JWSTpytools-0.0.3"
. /Users/jchevall/anaconda3/etc/profile.d/conda.sh
# This solves some installation issues with Python Anaconda and UTF-8 encoding
# see http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart-error-valueerror-unknown-locale-utf-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Set Anaconda env
#conda activate base
unset PYTHONPATH
# Default Fortran compiler
GCC_VER="6"
export FC="/usr/local/bin/gfortran-${GCC_VER}"
# Default C compiler
export CC="/usr/local/bin/gcc-${GCC_VER}"
# Default C++ compiler
export CXX="/usr/local/bin/g++-${GCC_VER}"
# OpenMPI variables
export OMPI_FC=$FC
export OMPI_CC=$CC
export OMPI_CXX=$CXX
# Intel Fortran
#source /opt/intel/composer_xe_2015.1.108/mkl/bin/intel64/mklvars_intel64.sh
# Default print: two-sided, A4
alias lp_default="lp -o sides=two-sided-long-edge -o media=A4"
# MPI env
alias g++="g++-"${GCC_VER}
alias gcc="gcc-"${GCC_VER}
alias gfortran="gfortran-${GCC_VER} -ffree-line-length-none"
alias gnu95="gfortran-${GCC_VER} -ffree-line-length-none"
# BC03 software stuff
export bc97="/Users/jchevall/bc99lx"
export bc03="/Users/jchevall/bc99lx/bc03/src"
source $bc03/.bc_bash
alias bc99="csh $bc97/is_97/bc99.sh"
alias cb09="csh $bc97/is_97/cb09.sh"
alias iso99="csh $bc97/Isochrones/isoc_bc99.sh"
###################################################
# START BEAGLE environment variables
###################################################
export CMAKE_MACROS="/Users/jchevall/Coding/cmake-macros"
export CMAKE_DEPENDENCIES="/Users/jchevall/Coding/cmake-dependencies"
export BEAGLE_PARAM_DIR="/Users/jchevall/Coding/BEAGLE/files/params"
export BEAGLE_TEST_FILES="/Users/jchevall/Coding/BEAGLE/files/tests"
export BEAGLE_ROOT="/Users/jchevall/Coding/BEAGLE/files"
export BEAGLE_TEMPLATES="${BEAGLE_ROOT}/templates"
export BEAGLE_FILTERS="${BEAGLE_ROOT}/filters"
export BEAGLE_DATA="${BEAGLE_ROOT}/data"
export BEAGLE_DUST="${BEAGLE_ROOT}/dust"
export BEAGLE_SF_CHE="${BEAGLE_ROOT}/sf_che"
export BEAGLE_RESULTS="${BEAGLE_ROOT}/results"
export PYP_BEAGLE="/Users/jchevall/Coding/PyP-BEAGLE"
# This environment variable is already defined by BC03 routines, but here you
# redefine it to be sure that the filters used are those in the BEAGLE directory
# tree
export FILTERS="${BEAGLE_FILTERS}/FILTERBIN.RES"
###################################################
# END BEAGLE environment variables
###################################################
# To split a PDF in several PDF with N pages each
alias PDFsplit="/Users/jchevall/bin/PDFsplit.py"
alias fv="open -a fv"
# Tmuxinator
source ~/bin/tmuxinator.zsh
# Bash, Zsh and fish completion support for git-flow (AVH Edition).
# see https://github.com/petervanderdoes/git-flow-completion
source ~/.git-flow-completion.zsh
# IDL
export IDLUTILS_DIR="/Users/jchevall/idlutils"
export IDL_DIR="/Applications/exelis/idl84"
export IDL_PATH="/Users/jchevall/IDL:$IDL_DIR/lib:$IDLUTILS_DIR/pro:$IDLUTILS_DIR/goddard/pro"
export IDL_STARTUP="/Users/jchevall/IDL/idl_startup.pro"
alias idl="$IDL_DIR/bin/idl"
# UREKA (includes IRAF and toher stuff)
alias ureka="open ~/Desktop/Ureka_primary.terminal"
export iraf="~/iraf/iraf/"
# Add iraf setup commands
if [ -f /Users/jchevall/.iraf/setup.sh ] ; then
source /Users/jchevall/.iraf/setup.sh
fi
alias openprev="open -a preview"
alias update_zsh="source ~/.zshrc.local ; rehash"
# Default commands for ps2eps conversion
alias myps2eps="ps2eps -B -f -l -H"
alias myps2eps_land="ps2eps -B -f -l -H -R -"
alias myps2eps_land_anti="ps2eps -B -f -l -H -R +"
alias sam2p_300="sam2p -l:gs=-r300"
alias sam2p_800="sam2p -l:gs=-r800"
# GOOGLE PROFILER
export HEAP_PROFILE_ALLOCATION_INTERVAL=10737418240
export CPUPROFILE_FREQUENCY=1000
#########################
##### Other aliases ####
#########################
#
# Common aliases
alias rsync="rsync -avz --progress"
alias cp="cp -p"
alias scp="scp -p"
alias df90="cd /Users/jchevall/bc99lx/Mock/F90/NEW_F90/F90_TO_RELEASE"
# ---> Tmux
alias tmux="tmux -u"
# ---> MATLAB
alias matlab="/Applications/MATLAB_R2011b.app/bin/matlab"
# ---> TextEdit
alias textedit="/Applications/TextEdit.app/Contents/MacOS/TextEdit"
# ---> TextWrangler
alias wrang="/Applications/TextWrangler.app/Contents/MacOS/TextWrangler"
# Close windows though terminal command
# cw Adobe\ Reader foo.pdf
# will close foo.pdf
cw() {
osascript <<EOF
tell application "$1"
set windowCount to number of windows
repeat with x from 1 to windowCount
set docName to (name of document of front window)
if (docName is equal to "$2") then
close window x
end if
end repeat
end tell
EOF
}