-
Notifications
You must be signed in to change notification settings - Fork 0
/
aliases
executable file
·127 lines (104 loc) · 3.41 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#function combines cd with ls, because who ever knows where they're going??
cdd() {
cd $1 && ls -p
}
#navigation
alias ..="cdd .."
alias ...="cdd ../.."
alias ....="cdd ../../.."
alias .....="cdd ../../../.."
#force grep to always use the color option
alias grep="grep --color=auto "
#long list alias
alias l='ls -laF'
alias ll='ls -pl'
#short list alias with hidden files included
alias la='ls -ap'
#only list directories
alias lsd='ls -l | grep "^d"'
#what's my ip?
alias ip='dig +short myip.opendns.com @resolver1.opendns.com'
alias localip='ipconfig getifaddr en0'
#toggle view hidden files in finder super easily
alias showall='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideall='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
#git aliases for everyday use
alias g='git'
alias s='git status'
alias a='git add'
alias a.='git add .'
alias ap='git add -p'
alias cj='jira-prefixed-commit'
alias cv='git commit -v'
alias ca='git commit --amend'
alias gb='git branch'
alias gbdm='git branch --merged main | grep -v "\main" | xargs -n 1 git branch -d'
alias gcb='git checkout -b'
alias gco='git checkout'
alias gpm='git push origin main'
alias gps='git push staging main'
alias gpl='git push live main'
alias gp='git push -u origin HEAD'
alias gd='git diff'
alias gcl='git clone'
alias gl='git log --graph --decorate'
alias gpull='git pull'
alias gpullm='git pull origin main'
alias gpullr='git pull origin main --rebase'
alias gsu='git submodule update --init --recursive'
# Undo a `git push`
alias undopush="git push -f origin HEAD^:main"
#rails aliases
alias r='rspec'
alias rk='rake'
alias rka='rake assets:precompile'
alias be='bundle exec'
#even faster text editor opener
alias e='code'
#rspec with color every time
alias rspec='rspec -c'
#reload the shell (i.e. invoke as a login shell)
alias reload="exec $SHELL -l"
#heroku debugging
alias h='heroku'
alias hr='heroku restart'
alias gph='git push heroku master'
alias prec="rka && a . && c 'assets precompile' && gph && hr"
#docker
alias d='docker '
alias di='docker images '
alias dco='docker-compose '
alias up='docker-compose up '
alias uprun='docker-compose run --service-ports '
alias dbash='printf "\n>>> Launching ubuntu bash in a docker container\n\n" && docker run -t -i ubuntu /bin/bash'
alias dcleani='printf "\n>>> Deleting untagged images\n\n" && docker rmi -f $(docker images -q -f dangling=true)'
alias dcleanc='printf "\n>>> Deleting exited containers\n\n" && docker rm -v $(docker ps -a -q -f status=exited)'
#terraform
alias tf='terraform '
#ansible
alias an='ansible '
alias anp='ansible-playbook '
alias ang='ansible-galaxy '
alias ani='ansible-inventory --list -y'
alias anv='ansible-vault'
#ubuntu
alias get='sudo apt-get update && sudo apt-get install '
alias of='nautilus '
alias soo='sudo'
alias xclip='xclip -selection c'
alias ps_names="ps -eF | awk '{print $11}'"
#brew
alias bi='brew install'
alias bci='brew install --cask'
alias bcs='brew search --casks --desc '
alias bcinfo='brew cask info '
#npm
alias npm_ls='npm ls --depth 0'
alias npm_lsg='npm ls --depth 0 -g'
#open servers - https://wilsonmar.github.io/ports-open/
alias of='lsof -nP +c 15 | grep LISTEN'
#curl
alias curl_h='curl -D - ' # dump response headers
alias curl_honly='curl -D - -o /dev/null ' # dump response headers, ignore body
#alacritty
alias tao='toggle-alacritty-opacity'