-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
104 lines (89 loc) · 2.56 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
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
# Bash
case "$(uname)" in
*Darwin*) ls_options=-lhG ;;
*) ls_options=-lh ;;
esac
function mkdir_and_cd()
{
command mkdir $@ && cd ${@[$#]}
}
alias mkdir='mkdir_and_cd'
alias cd='cd_and_load_node'
alias d="cd $DOTFILES"
alias dotfiles="app dotfiles"
alias ll="ls $ls_options"
alias la="ls $ls_options -a"
alias l=ll
alias f='find . -name'
alias j='jobs -dl'
# Git
alias gb='git branch'
alias gf='git fetch'
alias gap='git add -p'
alias gco='git checkout'
alias gd='git diff'
alias gdc='git diff --cached'
alias gcb='_gitcheckoutbranch'
alias gka='gitk --all'
alias gls='git ls-files'
alias gpop='git stash pop'
alias gstash='git stash'
alias gl='git log'
alias ga='git add .'
alias gs='git status'
alias gka='gitk --all'
alias gca='git commit --amend'
alias gcm='git commit -m'
alias gc='git commit'
alias gcem='git commit -em'
alias ghist='for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r'
alias gcd='cd "$(git rev-parse --show-toplevel)"'
alias gru="git remote update"
alias gdm='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d'
alias gdo='git branch | grep -v "\*" | xargs -n 1 git branch -D'
alias grpo='git remote prune origin'
alias gp='git pull --rebase'
alias gacm='git add . && git commit -m'
alias gcl='git_clone_and_cd'
# Bundler
alias be='bundle exec'
# Rspec
alias respect='bundle exec rspec'
alias ber='bundle exec rspec'
# Rails
alias r='rails'
alias rta='bin/rails test:all'
alias migrate='bundle exec rake db:migrate && bundle exec rake test:prepare'
alias rtap='rta && git push'
alias rtc='bundle exec rails test:controllers'
alias rtm='bundle exec rails test:models'
alias rt='bundle exec rails test'
# npm
alias nru='npm run unit'
alias nu='npm run unit'
alias nrd='npm run dev'
alias nt='npm run test'
# Apps
alias v='vim'
alias vi='vim'
alias n='nvim'
alias nv='nvim'
# Alias mac utilities to familiar names
case "$(uname)" in
*Darwin*) alias lsusb="system_profiler SPUSBDataType"
alias flushdns="sudo killall -HUP mDNSResponder"
alias lspci="ioreg -l | grep pci"
alias updatedb="sudo /usr/libexec/locate.updatedb"
;;
esac
# postgres
alias pgstart="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start"
alias pgstop="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log stop"
alias pgfix="rm /usr/local/var/postgres/postmaster.pid"
# heroku
alias h="heroku"
alias hr="heroku run"
# theme switching
alias kt="toggle_profile"
alias k="kubectl"
alias fix_chromedriver="xattr -d com.apple.quarantine $(which chromedriver)"