-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
65 lines (55 loc) · 1.95 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
# Unix
tail() {
stern -n $1 $2 --exclude-container istio-proxy
}
refresh() {
cb env --reset `kubectl config current-context`
}
# Folder shortcuts
alias be='bundle exec'
alias c='irb -r ./app.rb'
alias cbr='cd ~/Code/clearbit'
alias cbg='cd ~/go/src/github.com/clearbit'
alias hw='cd ~/Code/harlow'
alias ph='cd ~/Code/clearbit/person'
alias ch='cd ~/Code/clearbit/company'
alias apihub='cd ~/Code/clearbit/apihub'
# Terminal
alias -g G='| grep'
alias -g L='| wc -l'
alias -g M='| less'
alias -g ONE="| awk '{ print \$1}'"
alias ...='../..'
alias b='bundle exec'
alias l='ls'
alias lh='ls -Alh'
alias ll='ls -al'
alias ln='ln -v'
alias ls='ls -la'
alias mkdir='mkdir -p'
alias vi="vim"
# Git
alias gp='git push'
alias gs='git status'
alias wip='git commit -am "wip"'
# Ruby
alias help-strftime='ruby ~/bin/help-strftime.rb'
# Rails
alias migrate="bundle exec rake db:migrate db:test:prepare"
alias seed="bundle exec rake db:seed"
alias remigrate="bundle exec rake db:migrate db:migrate:redo db:schema:dump db:test:prepare"
# Heroku staging
alias staging='heroku run console --remote staging'
alias staging-process='watch heroku ps --remote staging'
alias staging-releases='heroku releases --remote staging'
alias staging-tail='heroku logs --tail --remote staging'
# Heroku production
alias production='heroku run console --remote production'
alias production-process='watch heroku ps --remote production'
alias production-releases='heroku releases --remote production'
alias production-tail='heroku logs --tail --remote production'
# Heroku databases
alias db-pull-staging='heroku db:pull --remote staging --confirm `basename $PWD`-staging'
alias db-pull-production='heroku db:pull --remote production --confirm `basename $PWD`-production'
alias db-copy-production-to-staging='heroku pgbackups:restore DATABASE `heroku pgbackups:url --remote production` --remote staging --confirm `basename $PWD`-staging'
alias db-backup-production='heroku pgbackups:capture --remote production'