-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.aliases
78 lines (65 loc) · 2.28 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
#!/usr/bin/env sh
#
# Core
#
alias c='clear'
alias q='exit'
alias reload='exec $SHELL -l' # invoke with login
alias refresh='source $HOME/.zshrc'
alias cp='cp -i'
alias mv='mv -i'
alias mkdir='mkdir -pv'
alias l='ls -1A --color=auto'
alias ll='ls -lh --color=auto'
alias la='ll -A --color=auto'
alias ..='cd ..'
alias grep='grep --color=auto'
alias dot-pull='git --git-dir="$HOME/.dotfiles/.git" --work-tree="$HOME/.dotfiles/" pull; source "$HOME/.zshrc"'
alias dotfiles="pushd "$HOME/.dotfiles" > /dev/null 2>&1; git pull --prune; git submodule update --init --recursive; symlink-dotfiles && source "$HOME/.zshrc"; popd > /dev/null 2>&1;"
alias cat='bat'
alias ping='prettyping --nolegend'
alias du='ncdu --color dark -rr -x'
#
# Languages
#
alias rocknroll='$HOME/.dotfiles/bin/rocknroll'
alias brewroll='brew update && brew upgrade --greedy && brew cask update && brew cask cleanup && brew cleanup'
alias rubyroll='gem update --system && gem update && gem cleanup'
alias phproll='composer self-update --clean-backups && composer update'
alias noderoll='npm update -g'
alias pythonroll='pip install -U setuptools pip'
#
# Git
#
alias g='git'
alias gs='git status -sb'
alias gd='git diff --minimal'
alias gpp='git pull --prune'
alias gpf='git push --force'
alias gca='git commit --amend --no-edit'
#
# Ruby
#
alias be='bundle exec'
#
# Docker
#
alias dk='docker'
alias dk-info='docker info --format "{{json .}}" | jq .'
alias dk-rmc='docker rm $(docker ps -q -f "status=exited")'
alias dk-rmi='docker rmi $(docker images -q -f "dangling=true")'
alias dk-rmv='docker volume rm $(docker volume ls -q -f "dangling=true")'
alias dk-prune='docker system prune'
dk-tail() {
watch -n 2 'docker ps --format "table {{.ID}}\t {{.Image}}\t {{.Status}}"'
}
alias dcp='docker-compose'
#
# Useful
#
alias top_process='ps -eo pcpu,pid,user,args | sort -k 1 -r | head -5'
alias whatsmyip='curl https://api.ipify.org/'
alias flush-cache='sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder'
alias flush-terminal='sudo rm /var/log/asl/*.asl'
alias flush-launchservices='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder'
alias empty-trash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv $HOME/.Trash;"