Skip to content

Instantly share code, notes, and snippets.

@newmen
Last active May 13, 2024 14:44
Show Gist options
  • Save newmen/c8e7370f4bd5cd71f5e8de11f232e453 to your computer and use it in GitHub Desktop.
Save newmen/c8e7370f4bd5cd71f5e8de11f232e453 to your computer and use it in GitHub Desktop.
.zsh_aliases
export PATH=$HOME/bin:$PATH:/usr/local/sbin
export PATH=$PATH:$HOME/appengine-java-sdk/bin
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export HISTFILESIZE=5000000
#export HISTCONTROL=ignoredups
export HISTCONTROL=ignoreboth:erasedups
export GCC_MV=7
#export GCC_MV=6
export GCC_PATH=/usr/local/Cellar/gcc/7.2.0
#export GCC_PATH=/usr/local/Cellar/gcc@6/6.4.0
#export CC=${GCC_PATH}/bin/x86_64-apple-darwin16.0.0-gcc-${GCC_MV}
#export CXX=${GCC_PATH}/bin/x86_64-apple-darwin16.0.0-g++-${GCC_MV}
export CC=${GCC_PATH}/bin/gcc-${GCC_MV}
export CXX=${GCC_PATH}/bin/g++-${GCC_MV}
#export CC=gcc
#export CXX=g++
# REMOVE IT WHEN YOU LEAVE FROM ODIN
ODIN_ENV=$HOME/.odin_env
[[ -e $ODIN_ENV ]] && source $ODIN_ENV
export GOOGLE_APPENGINE_PATH=$HOME/google-cloud-sdk/platform/google_appengine/
export GOOGLE_APPLICATION_CREDENTIALS=$HOME/Downloads/tmediator-f7fa27482d63.json
export PYTHONPATH=$PYTHONPATH:$GOOGLE_APPENGINE_PATH
alias ls='ls -Gh'
alias ll='ls -l'
alias df='df -h'
alias less='less -R'
alias tf='tail -f'
alias env='env | sort'
alias irb='pry'
alias ruby='ruby --enable-frozen-string-literal'
alias rb='ruby'
alias py='ipython'
alias p3='python3'
alias ex='emacs -nw'
alias make='make -e -j8'
alias vg='vagrant'
alias vu='vg up'
alias vs='vg ssh'
alias vh='vg halt'
alias can="source ${HOME}/Library/Enthought/Canopy_64bit/User/bin/activate"
alias can-sys="source ${HOME}/Library/Enthought/Canopy_64bit/System/bin/activate"
GREP_CFG="--color=always --exclude-dir=.idea --exclude-dir=target --exclude-dir=.git --exclude-dir=.svn --exclude-dir=.clj-kondo --exclude-dir=.calva --exclude-dir=.lsp --exclude-dir=node_modules --exclude-dir=.env --exclude-dir=env --exclude-dir=dist --exclude-dir=build --exclude=\"*.map\" --exclude=\"*.d\" --exclude=\"*.xyz\" --exclude=\"*.sls\" --exclude=\"*.log\" --exclude=.lein-repl-history"
alias grep="ggrep $GREP_CFG"
alias gr='grep -RnI'
alias egrep="ggrep -E $GREP_CFG"
alias egr='egrep -RnI'
function gc {
bgn='[[:cntrl:]][^_[:cntrl:]]*'
needle=`echo $@ | sed 's/\\\\b//g'`
gr $@ | egrep -E -v "${bgn}[^#]*#.*${needle}" | egrep -v "${bgn}[^//]*//.*${needle}"
}
function gb {
needle=$1
shift
gc "\b$needle\b" $@
}
alias com='git co master'
alias cor='git co release'
alias pom='com && git pull origin master'
alias por='cor && git pull origin release'
alias cob='pom && git co -b'
function lab {
can
if [ "$#" -eq 0 ]; then
py --pylab
else
py --pylab -- $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment