-
Notifications
You must be signed in to change notification settings - Fork 7
/
aliases
117 lines (98 loc) · 3.19 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
# vim: ft=bash
# Place any alias commands in here
## Try to keep them available to all shells
# Command Aliases
alias psg='ps -ef|grep '
alias ssh='TERM=xterm-256color ssh'
alias sshp='ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no'
## ls aliases
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias lh='ls -alFh'
## apt-get aliases
alias sai='sudo apt-get install'
alias sar='sudo apt-get remove'
alias saar='sudo apt-get autoremove'
alias sau='sudo apt-get update'
alias saup='sudo apt-get upgrade'
## Ruby aliases
alias be='bundle exec'
alias cucumber='bundle exec cucumber --color'
alias guard='bundle exec guard'
alias rackup='bundle exec rackup'
alias rake='bundle exec rake'
alias rspec='bundle exec rspec --color'
alias serve='ruby -run -e httpd . -p 8080'
alias rod='git diff --relative --name-only | grep _spec.rb | xargs bundle exec rspec'
alias rof='bundle exec rspec --color --only-failures'
## Git aliases
alias g='git'
alias ga='g a'
alias gaa='g aa'
alias gc='g c'
alias gc-m='g c -m'
alias gd='g d'
alias gl='g l'
alias gst='g st'
## Dev aliases
alias fcomp='file_composition'
alias mt='make test'
alias cdr='cd $(git rev-parse --show-toplevel)'
alias dt='GIT_EXTERNAL_DIFF=difft git diff'
## tmux aliases
alias tl='tmux attach -t "$(tmux list-sessions | fzf --no-preview --select-1 | cut -d':' -f1)"'
alias tls='tmux ls'
alias tm='tmux_create_or_attach'
alias tma='tmux_new_attach_to_session'
alias tk='tmux kill-session -t'
alias tmr='tmuxinator'
alias tml='tmuxinator_list_and_start'
## rsync aliases
alias rsync-copy='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'
alias rsync-move='rsync-copy --remove-source-files'
alias rsync-update='rsync-copy --update'
## Super lazy-time update functions
alias up-vim='git_update $HOME/.config/nvim'
alias up-shell='git_update $HOME/.adshell'
alias up-tmux='git_update $HOME/.tmux-config'
alias up-all='up-vim && up-shell && up-tmux'
# Docker Aliases
alias d='docker'
alias dbr='docker run --rm -it $(docker build -q .)'
alias dc='docker-compose'
alias dcrc='docker-compose up -d --no-deps --build '
alias dcl='docker-compose logs -f --tail=100 '
alias dm='docker-machine'
alias dme='eval #(docker-machine env)'
alias dsh="attach_shell_to_docker_container"
# Kubernetes Aliases
alias k='kubectl'
alias mk='minikube'
# Ansible Aliases
alias anp='ansible-playbook'
alias ang='ansible-galaxy'
alias anv='ansible-vault'
# Better CLI tools when available
if ( type prettyping &>/dev/null ) ; then
alias ping='prettyping'
fi
if ( type bat &>/dev/null ) ; then
alias cat='bat'
fi
# If eza is installed, use it for better ls
if type eza &>/dev/null; then
alias ls='eza'
fi
alias ncdu='ncdu -rr --color dark --exclude .git --exclude "node_modules"'
# Misc Aliases
if ( type nvim &>/dev/null) ; then
alias v='env TERM=wezterm nvim'
else
alias v='vim'
fi
alias vm='vagrant'
alias nwd='terminal-notifier -message "Task Complete"'
alias tf='terraform'
# Remount SD card on OSX
alias sdremount='sudo kextunload /System/Library/Extensions/AppleStorageDrivers.kext/Contents/PlugIns/AppleUSBCardReader.kext; sudo kextload /System/Library/Extensions/AppleStorageDrivers.kext/Contents/PlugIns/AppleUSBCardReader.kext'