-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
135 lines (106 loc) · 2.99 KB
/
.bash_aliases
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
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/usr/bin/env bash
if [[ $OSTYPE =~ darwin* || $OSTYPE =~ freebsd* ]]; then
alias ls="ls -ACFG"
alias ll="ls -AFGhl"
if [[ -x /usr/local/bin/gls ]]; then
alias ls="gls -ACFN --color=auto"
alias ll="gls -AFhlN --color=auto"
fi
else
alias ls="ls -ACF --color=auto"
alias ll="ls -AFhl --color=auto"
fi
alias l="ll"
alias lll="ll"
alias kk="ll"
alias li="ll"
alias coffee="caffeinate -sim"
alias grep="grep --color=auto"
alias fgrep="fgrep --color=auto"
alias egrep="egrep --color=auto"
alias df="df -h"
alias du="du -h"
alias ds="du -csh"
alias xs="cd"
alias CD="cd"
alias cd..="cd .."
alias mysql="mysql -u root"
alias mysqldump="mysqldump -u root"
alias mysqladmin="mysqladmin -u root"
alias redis="redis-server"
alias tailf="tail -f"
# Git
alias g="git"
alias gst="git status"
alias gco="git checkout"
alias grm="git rm"
alias glog="git log"
alias giff="git diff"
# SVN
alias sup="svn update"
alias sst="svn status"
alias sco="svn checkout"
alias srm="svn rm"
alias slog="svn log | less -r"
alias srv="svn revert"
siff ()
{
svn diff $@ | less -r
}
# Vim
alias nano="vim"
# Emacs
alias e="emacs"
alias e.="emacs ."
# SublimeText
alias s="subl"
alias s.="subl ."
# TextMate
alias m="mate"
alias m.="mate ."
alias install_rvm="curl -L https://get.rvm.io | bash"
alias install_rvm_stable="curl -L https://get.rvm.io | bash -s stable"
alias install_homebrew="curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby"
# Ruby and Rails
alias rb="ruby"
alias r="rails"
alias console="rails console"
alias c="rails console"
alias controller="rails generate controller"
alias model="rails generate model"
alias migration="rails generate migration"
alias scaffold="rails generate scaffold"
alias drop="rake db:drop"
alias create="rake db:create"
alias migrate="rake db:migrate"
alias rollback="rake db:rollback"
alias seed="rake db:seed"
alias u="unicorn -c config/unicorn.rb"
alias t="rails server thin"
alias start="foreman start"
alias server="rails server"
alias i_screwed_up="drop && create && migrate && seed"
alias todo="rake todo"
alias p="ping"
alias pp="p abv.bg"
# Python stuff
# alias python="python"
alias py="python"
# alias pip="pip"
alias pipi="pip"
alias bat="pmset -g batt | grep InternalBattery | sed -E s/.*\([[:digit:]]+:[[:digit:]]+\).*/\\\1/"
# virtualenv aliases
# http://blog.doughellmann.com/2010/01/virtualenvwrapper-tips-and-tricks.html
alias v="workon"
alias v.deactivate="deactivate"
alias v.mk="mkvirtualenv --no-site-packages"
alias v.mk_with_site_packages="mkvirtualenv"
alias v.cp="cpvirtualenv"
alias v.rm="rmvirtualenv"
alias v.switch="workon"
alias v.add2virtualenv="add2virtualenv"
alias v.cdsitepackages="cdsitepackages"
alias v.cd="cdvirtualenv"
alias v.lssitepackages="lssitepackages"
alias bon="defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool YES"
alias boff="defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool NO"