-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
90 lines (68 loc) · 2.38 KB
/
.bashrc
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
export PATH=$PATH:/Applications/kdiff3.app/Contents/MacOS
alias ll="ls -l"
#navigation
#alias aws="ssh -l $AWS_USERNAME -i $AWS_TOKEN $AWS_BOX"
alias gd="ssh -l $GO_DADDY_USERNAME -i $GO_DADDY_TOKEN $GO_DADDY_BOX"
alias aws="gd"
alias brackets="cd ~/Code/brackets"
alias code="cd ~/Code"
alias website="cd ~/Code/personal-website/www/"
alias www="website"
alias blog="cd ~/Code/blog"
alias hero="cd ~/Code/heroku"
alias ghost="cd ~/Code/Ghost"
#heroku
alias hstatus="heroku ps"
alias hps="hstatus"
alias hpstype="heroku ps:scale web=1"
alias hopen="heroku open"
alias hlocally="foreman start" #localhost:5000"
alias hl="hlocally"
#website release - pull newest origin master
alias hrelease="git push heroku master -f"
alias release="hrelease"
#when a cd won't eject
alias eject="drutil tray eject"
#sweet unix commands
copy () { `pbcopy < $1`; }
#.bash shortcuts-------------
alias profile="emacs ~/.bash_profile"
alias rc="emacs ~/.bashrc"
alias reload="source ~/.bash_profile ; source ~/.bashrc"
#Notes-----------------------
# java source code location
# /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home/src.jar
#Git-------------------------
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BRANCH_COLOR="\[\033[0;36m\]"
NO_COLOR="\[\033[0m\]"
PS1="[\W$BRANCH_COLOR\$(parse_git_branch)$NO_COLOR]\$ "
alias fa="git fetch --all"
alias gclean="git clean -f"
alias gconfig="emacs .git/config"
#git autocomplete
source ~/.git-completion.bash
#commit logs
alias gl="git log --oneline --graph --decorate --color=always --pretty=format:'%Cgreen%h%Creset -%C(yellow)%d%Creset %s'| less -R"
alias lg="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an <%cn>%Creset' --abbrev-commit --all | less -R"
alias gs="git status"
#diffing
alias difftool="git difftool --no-prompt"
alias dt="difftool"
alias mergetool="git mergetool"
alias mt="mergetool"
alias dom="dt origin/master"
alias gdn="git diff --color=always --name-only origin/master"
# notes
# git config --global user.name "John Doe"
# git config --global user.email [email protected]
# git config --list
# ~/.gitconfig
# git push personal :<BranchName> # deletes a branch on your personal repo
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"