forked from asbjornu/dotfiles-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
60 lines (53 loc) · 1.75 KB
/
.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
# Git shortcuts
alias g='git'
alias ga='git add'
alias gp='git push'
alias gpa='gp --all'
alias gu='git pull'
alias gl='git log'
alias gg='gl --decorate --oneline --graph --date-order --all'
alias gs='git status'
alias gst='gs'
alias gd='git diff'
alias gdc='gd --cached'
alias gm='git commit -m'
alias gma='git commit -am'
alias gb='git branch'
alias gba='git branch -a'
function gc() { git checkout "${@:-master}"; } # Checkout master by default
alias gco='gc'
alias gcb='gc -b'
alias gr='git remote'
alias grv='gr -v'
#alias gra='git remote add'
alias grr='git remote rm'
alias gcl='git clone'
# TextMate
alias tm=/Users/asbjorn/bin/mate
alias textmate=/Users/asbjorn/bin/mate
alias TextMate=/Users/asbjorn/bin/mate
alias mate='/Applications/TextMate.app/Contents/Resources/mate'
# Shell improvements
alias ll='ls -lasG'
alias ls='ls -lahF'
alias 'cd..'='cd ..'
alias 'cd.'='cd .'
alias 'cd-'='cd -'
alias cls='history -c && clear'
# MySQL shortcuts
alias mysql='/opt/local/share/mysql5/mysql/mysql'
alias mysqlstart='sudo /opt/local/share/mysql5/mysql/mysql.server start'
alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown'
alias mysqlrestart='/opt/local/share/mysql5/mysql/mysql.server restart'
alias mysqlreload='/opt/local/share/mysql5/mysql/mysql.server reload'
# Apache shortcuts
alias apachestart='sudo /opt/local/apache2/bin/httpd -k start'
alias apachestop='sudo /opt/local/apache2/bin/httpd -k stop'
alias apacherestart='sudo /opt/local/apache2/bin/httpd -k graceful'
# Misc shortcuts
alias todo='/usr/local/bin/todo.sh'
# Sync NTP
alias ntpsync="ntpdate -u $(sudo systemsetup -getnetworktimeserver|awk '{print $4}')"
alias fuck='sudo $(history -p \!\!)'
# When using sudo, use alias expansion (otherwise sudo ignores your aliases)
alias sudo='sudo '