-
Notifications
You must be signed in to change notification settings - Fork 3
/
aliases.local
88 lines (84 loc) · 3.93 KB
/
aliases.local
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
alias e='mvim'
alias ...='../..'
alias gui='github'
alias rc='rails c'
alias sr='./bin/local_server'
alias gcl='g clone'
alias gp='g push'
alias gpu='g pull'
alias gf='g ci --fixup'
alias gfh='gf HEAD [email protected]'
alias gca='g checkout .'
alias gd='g diff'
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
alias cb="g rev-parse --abbrev-ref HEAD | tr -d '\n' | tr -d ' ' | pbcopy"
alias gb='g branches'
alias gcp='g cherry-pick'
alias gs='g stash save'
alias gsa='g stash apply'
alias ga='g add --all'
alias grv='g remote -v'
alias gr='g rebase [email protected]'
alias gri='g rebase [email protected] -i'
alias grc='g rebase --continue'
alias gra='g rebase --abort'
alias gpf='gp --force-with-lease'
alias gsh='g show HEAD'
alias gcd='g co development'
alias gcM='g co master'
alias gcm='g co main'
alias gdb='g delete-branch'
alias gDb='g branch -D'
alias gcb='g create-branch'
alias grh='g reset --hard'
alias gc='g co'
alias gci='g ci [email protected]'
alias gm='g merge'
alias gmd='g merge development'
alias gmm='g merge master'
alias gmf='g -c merge.ff= merge [email protected]'
alias gam='g aa; g ci -S -m'
alias m='migrate'
alias rtd='RAILS_ENV=test rails db:drop db:create db:migrate'
alias grd='g rebase [email protected] -i development'
alias grm='g rebase [email protected] -i main'
alias grM='g rebase [email protected] -i master'
alias p='ping google.com'
alias ww='watch '
# Run once in every rails project directory to shim bundle exec
alias bunbin='bundle install --binstubs .bundle/bin'
alias k='kubectl'
alias f='flux'
alias kgp='k get pods -A'
alias kdp='k describe pods -A'
alias kgn='k get nodes'
alias kdn='k describe nodes'
alias kgs='k get services -A'
# Administer EKS environments:
alias ame='awsume verumex-management-kubernetes-administrator; kubectl config use-context verumex-management-eu'
alias ase='awsume verumex-staging-kubernetes-administrator; kubectl config use-context verumex-staging-eu'
alias ape='awsume verumex-production-kubernetes-administrator; kubectl config use-context verumex-production-us'
alias apeu='awsume verumex-production-kubernetes-administrator; kubectl config use-context verumex-production-eu'
# Run the rails console in our EKS clusters:
alias pc='ape; kubectl exec -it --namespace verumex `kubectl get pods --field-selector=status.phase=Running --namespace verumex --selector=app.kubernetes.io/instance=verumex | grep Running | grep -m1 verumex | awk "{print $1;}"` -- bundle exec rails c'
alias pce='apeu; kubectl exec -it --namespace verumex `kubectl get pods --field-selector=status.phase=Running --namespace verumex --selector=app.kubernetes.io/instance=verumex | grep Running | grep -m1 verumex | awk "{print $1;}"` -- bundle exec rails c'
alias plogs='ape; kubectl logs deployment/verumex --namespace verumex --all-containers=true -f'
alias sc='ase; kubectl exec -it --namespace verumex `kubectl get pods --field-selector=status.phase=Running --namespace verumex --selector=app.kubernetes.io/instance=verumex | grep Running | grep -m1 verumex | awk "{print $1;}"` -- bundle exec rails c'
alias slogs='ase; kubectl logs deployment/verumex --namespace verumex --all-containers=true -f'
alias fix='$EDITOR `git diff --name-only | uniq`'
alias remove_stale_postgres_pid_file='rm /usr/local/var/postgres/postmaster.pid'
alias ra='rubocop -a'
alias rp='rubocop --parallel'
alias ja='yarn lint-write; yarn tsc'
alias sa='yarn run stylelint --syntax scss app/assets/stylesheets/**/*.scss --fix'
alias l='ra; ja; sa'
alias t='terraform'
alias tc='terraform console'
alias ti='terraform init'
alias tp='terraform plan'
alias ta='terraform apply'
alias get_idf='. $HOME/repos/esp/esp-idf/export.sh'
alias setup_matter='get_idf;. $HOME/repos/esp/esp-matter/export.sh'
alias get_ports='ls /dev/cu.*'
# Include private aliases
[[ -f ~/.aliases.private ]] && source ~/.aliases.private