-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile
123 lines (98 loc) · 3.35 KB
/
.bash_profile
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
export EDITOR=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl
export WORKON_HOME=~/Envs
source /usr/local/bin/virtualenvwrapper.sh
# alias GAx='cd /Users/mnorelli/fundamentals29/wdi-fundamentals-exercises'
alias GA='cd /Users/mnorelli/GA_WDI29'
# alias irf='wine /Users/mnorelli/Downloads/iview441/i_view32.exe'
# Path to the bash it configuration
export BASH_IT="/Users/mnorelli/.bash_it"
# Lock and Load a custom theme file
# location /.bash_it/themes/
export BASH_IT_THEME='bobby'
# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='[email protected]'
# Don't check mail when opening terminal.
unset MAILCHECK
# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'
# Set this to the command you use for todo.txt-cli
export TODO="t"
# Set this to false to turn off version control status checking within the prompt for all themes
export SCM_CHECK=true
# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/xvzf/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
# Load Bash It
source $BASH_IT/bash_it.sh
# do mkdir and cd into new directory all in one step, from http://linux.101hacks.com/cd-command/mkdir-and-cd-together/
function mkcd () { mkdir -p "$@" && cd $_; }
eval "$(fasd --init auto)"
# Helpful Functions
# =====================
# A function to CD into the desktop from anywhere
# so you just type desktop.
# HINT: It uses the built in USER variable to know your OS X username
# USE: desktop
# desktop subfolder
function desktop {
cd /Users/$USER/Desktop/$@
}
# A function to easily grep for a matching process
# USE: psg postgres
function psg {
FIRST=`echo $1 | sed -e 's/^\(.\).*/\1/'`
REST=`echo $1 | sed -e 's/^.\(.*\)/\1/'`
ps aux | grep "[$FIRST]$REST"
}
# A function to extract correctly any archive based on extension
# USE: extract imazip.zip
# extract imatar.tar
function extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# Aliases
# =====================
# LS
alias l='ls -lah'
# Git
alias gcl="git clone"
alias gst="git status"
alias gl="git pull"
alias gp="git push"
alias gd="git diff | mate"
alias gc="git commit -v"
alias gca="git commit -v -a"
alias gb="git branch"
alias gba="git branch -a"
alias gcam="git commit -am"
alias gbb="git branch -b"
post() {
git add .
git commit -m "$1"
git push
}
# Case-Insensitive Auto Completion
bind "set completion-ignore-case on"
# Postgres
export PATH=/Applications/Postgres.app/Contents/Versions/9.4/bin:$PATH
export PATH=/usr/local/sbin:$PATH
# ******* THIS MUST BE THE FILE LINE IN THE BASH_PROFILE ******
# rvm
source ~/.profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*