-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
94 lines (73 loc) · 2.36 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
# Movement
alias ..="cd .."
alias ~="cd ~" # `cd` is probably faster to type though
alias -- -="cd -"
alias dl="cd ~/Downloads"
### Less
alias less="less -r"
### Git
alias g="git"
alias gst="git status"
alias git-clean='git branch --merged | grep -v "\*" | grep -v master | grep -v development | xargs -n 1 git branch -d'
alias tss='tig status'
### Rails specfic
alias g-rails='git checkout master -- db/structure.sql && make rebuild-database && rails db:migrate && git add db/structure.sql && git rebase --continue'
alias t='rails test'
alias rdm='rails db:migrate'
alias rdr='rails db:rollback'
alias rdtp='rails db:test:prepare'
# Enable aliases to be sudo’ed
alias sudo='sudo '
# Get week number
alias week='date +%V'
# HTTP/DNS
alias sniff="sudo ngrep -t '^(GET|POST) ' 'tcp and port 80'"
alias httpdump="sudo tcpdump -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
alias find-my-pi="arp -na | grep -i b8:27:eb"
# Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
# Merge PDF files
# Usage: `mergepdf -o output.pdf input{1,2,3}.pdf`
alias mergepdf='/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py'
# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
alias stfu="osascript -e 'set volume output muted true'"
alias pumpitup="osascript -e 'set volume output volume 100'"
# Reload the shell (i.e. invoke as a login shell)
alias reload="exec $SHELL -l"
# Neovim > Vim
alias vim="nvim"
alias v="nvim"
# Brew
alias bu="brew update && brew upgrade"
# Git
alias grmi="git commit -am \"f\" && git rebase master -i"
alias grc="git rebase --continue"
# Tmux
alias ta="tmux attach-session -t"
alias tn="tmux new-session -s"
# ZSH
alias zshrc='vim ~/.zshrc'
alias zsh_alias='vim ~/.aliases'
# Elixir & Mix
alias iexm='iex --erl "-kernel shell_history enabled" -S mix'
alias phxs='mix phx.server'
alias mt='mix test'
# Python
alias psa='source activate'
alias psd='source deactivate'
# Exa
alias l="exa -l"
alias ll="exa -l"
alias la="exa -la"
# Docker
alias dc="docker-compose"
# Kubernetes/Helm
alias k="kubectl "
alias kctldp="kubectl describe pod"
alias ccontext="kubectl config current-context"
alias hst="helm status"
# dbt
alias dtbf='dbt build --full-refresh'
alias dtb='dbt build'
alias dtbc='dbt build --select client'
alias dtbp="dbt deps && dbt --warn-error build --fail-fast"