-
Notifications
You must be signed in to change notification settings - Fork 1
/
zprofile
69 lines (60 loc) · 1.88 KB
/
zprofile
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
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# Aliases
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# Human readable du/df
alias du='du -kh'
alias df='df -kTh'
# For seeing used space.
alias diskspace="du -S | sort -n -r |more"
# Get Libpath
alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}'
# Full LS print
alias lss='ls -larth'
alias ls="ls -la"
# -> Prevents accidentally clobbering files.
alias mkdir='mkdir -p'
# Display path
alias path='echo -e ${PATH//:/\\n}'
# From the tldp.org
function extract() # Handy Extract Program
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;
*.tgz) tar xvzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via >extract<" ;;
esac
else
echo "'$1' is not a valid file!"
fi
}
# exports
export CLICOLOR=1
# fallback libraries for compiling caffe with cuda
export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/cuda/lib:$HOME/anaconda/lib:/usr/local/lib:/usr/lib
export GREP_OPTIONS='--color=auto'
export PATH=/usr/local/sbin:$PATH
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
eval $(/opt/homebrew/bin/brew shellenv)
# Load pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
# Configure GPG to accept passphrase from terminal
export GPG_TTY=$(tty)