-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.alias
89 lines (81 loc) · 3.86 KB
/
.alias
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
# Modern Unix Commands
# https://github.com/ibraheemdev/modern-unix
alias cat=/opt/homebrew/bin/bat
alias ls=/opt/homebrew/bin/lsd
alias l='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'
# GENERAL
alias c="code ."
alias hosts='sudo nvim /etc/hosts'
alias zshrc='${=EDITOR} ~/.zshrc' # Quick access to the ~/.zshrc file
alias pip-update="pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U"
alias hs='history | grep'
alias www='python -m http.server'
alias speed='speedtest-cli --server 2406 --simple'
alias ipe='curl ipinfo.io/ip'
alias proxyon='sh ~/scripts/proxy_on.sh'
alias proxyoff='sh ~/scripts/proxy_off.sh'
alias getnpmrc='readlink ~/.npmrc | cut -d '/' -f 5'
alias cpprogress='rsync -ah --progress '
alias omz_update="omz update && cd "$ZSH_CUSTOM/themes/spaceship" && git fetch -p && git pull && cd"
# MAC
alias python="python3"
alias brewupdate="brew update && brew upgrade && brew cu --yes --cleanup && mas upgrade && brew cleanup -s && brew doctor && brew missing && pip-update"
alias hidedesk='defaults write com.apple.finder CreateDesktop -bool false; killall Finder;'
alias showdesk='defaults write com.apple.finder CreateDesktop -bool true; killall Finder;'
alias brewbck='brew bundle dump --force --file="$DOTFILES/Brewfile" && if test -f $DOTFILES/work_variables/brewbck.zsh; then zsh $DOTFILES/work_variables/brewbck.zsh; fi'
# tmux aliases
alias ta='tmux attach'
alias tls='tmux ls'
alias tat='tmux attach -t'
alias tns='tmux new-session -s'
# GIT
function gc { git commit -m "$@"; }
alias gs="git status";
alias gp="git pull";
alias gf="git fetch";
alias gpush="git push";
alias gd="git diff";
alias ga="git add .";
dif() { git diff --color --no-index "$1" "$2" | diff-so-fancy; }
cdiff() { code --diff "$1" "$2"; }
alias gits='git init && git add . && git commit -m "Starting repository"'
alias gac='ga && git commit -a -m '
grr() { git fetch -p && for branch in $(git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == "[gone]" {sub("refs/heads/", "", $1); print $1}'); do git branch -D $branch; done }
# NPM
alias ni="npm install";
alias nis='npm install --save'
alias nisd='npm install --save-dev'
alias npm-update="npx npm-check -u";
alias yarn-update="yarn upgrade-interactive --latest";
alias nrs="npm run start -s --";
alias nrb="npm run build -s --";
alias nrd="npm run dev -s --";
alias nrt="npm run test -s --";
alias nrtw="npm run test:watch -s --";
alias nrv="npm run validate -s --";
alias rmn="rm -rf node_modules";
alias flush-npm="rm -rf node_modules && npm i && say NPM is done";
alias nicache="npm install --prefer-offline";
alias nioff="npm install --offline";
# Other alias
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias flushdns="sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder"
alias findprocess="ps -ax | grep -i"
alias sign="sudo xattr -r -d com.apple.quarantine"
alias daily="weather && echo "" && cal"
alias tf="terraform"
# Karabiner
alias karabinerLoad='launchctl load /Library/LaunchAgents/org.pqrs.karabiner.karabiner_console_user_server.plist; \
sudo launchctl load /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_grabber.plist; \
sudo launchctl load /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_observer.plist;'
alias karabinerUnload='launchctl unload /Library/LaunchAgents/org.pqrs.karabiner.karabiner_console_user_server.plist; \
sudo launchctl unload /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_grabber.plist; \
sudo launchctl unload /Library/LaunchDaemons/org.pqrs.karabiner.karabiner_observer.plist; \
sudo killall karabiner_grabber; \
sudo killall karabiner_console_user_server; \
sudo killall Karabiner-Menu; \
sudo killall Karabiner-Elements'