Skip to content

Instantly share code, notes, and snippets.

@r-shekhar
Last active March 20, 2017 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-shekhar/ed3e1ba3837bb7d5c7589b25b571af1d to your computer and use it in GitHub Desktop.
Save r-shekhar/ed3e1ba3837bb7d5c7589b25b571af1d to your computer and use it in GitHub Desktop.
Zshrc
##############################################################################
#super duper shell wildcards. Makes zsh worth using
setopt extendedglob
##############################################################################
#keep history file between sessions
HISTSIZE=1000000
SAVEHIST=1000000
HISTFILE=$HOME/.history
setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt INC_APPEND_HISTORY
##############################################################################
#don't beep EVER
setopt NO_BEEP
#FANCY shell prompt
autoload colors
colors
local text="%{$fg_no_bold[blue]%}"
local text_emph="%{$fg_no_bold[red]%}"
local punctuation="%{$fg_no_bold[blue]%}"
local emph="%{$fg_no_bold[red]%}"
local final="%{$reset_color%}"
#PROMPT="${punctuation}(${text_emph}%n${emph}@${text}%m${punctuation})${final} "
PROMPT="${punctuation}${text}%n${emph}@${text}%m${punctuation}:%!${text}:%1~${punctuation}:${emph}%#${punctuation}>${final} "
PROMPT2="${text}%_${punctuation}|-${final} "
# this sets stderr in red, but breaks some things
#exec 2>>(while read line; do
# print '\e[91m'${(q)line}'\e[0m' > /dev/tty; print -n $'\0'; done &)
##############################################################################
#aliases
alias ll="ls -l"
alias qq="cd .."
alias ls="ls --color=auto"
alias edit="emacs -nw"
##############################################################################
# ediff is now a command line function =)
function ediff() {
emacs -nw --eval "(ediff \"$1\" \"$2\")"
}
##############################################################################
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:${LD_LIBRARY_PATH}
export EDITOR='emacs -nw'
export PATH="${HOME}/anaconda3/bin:$PATH"
#HADOOP VARIABLES START
JAVA_HOME=`which java`
JAVA_HOME=`readlink -f ${JAVA_HOME}`
export JAVA_HOME=`echo ${JAVA_HOME} | sed -e 's/\/bin\/java//'`
#export HADOOP_INSTALL=/usr/local/hadoop
#export PATH=$PATH:$HADOOP_INSTALL/bin
#export PATH=$PATH:$HADOOP_INSTALL/sbin
#export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
#export HADOOP_COMMON_HOME=$HADOOP_INSTALL
#export HADOOP_HDFS_HOME=$HADOOP_INSTALL
#export YARN_HOME=$HADOOP_INSTALL
#export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
#export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
#HADOOP VARIABLES END
## This block might be useful for PySpark. Uncomment if needed.
export JRE_HOME=${JAVA_HOME}
export PYSPARK_SUBMIT_ARGS="--master 'local[4]' --executor-memory 3.5G --driver-memory 2G"
export PYSPARK_DRIVER_PYTHON="jupyter"
export PYSPARK_DRIVER_PYTHON_OPTS="notebook --no-browser --port=9748"
export SPARK_DRIVER_PYTHON=${HOME}/anaconda3/bin/python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment