-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathaliases
66 lines (49 loc) · 2.62 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
# List direcory conqtents
alias ls='exa'
alias l='exa -lah --icons -s type'
# Color output
alias grep='grep --color=auto'
alias tree="tree -C"
# Update Homebrew formulas and casks
alias update='brew update && brew upgrade; brew cleanup; git -C ~/.dotfiles pull'
# Enhanced WHOIS lookups
alias whois="whois -h whois-servers.net"
# Clean up LaunchServices to remove duplicates in the “Open With” menu
alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder"
# Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
# Empty the Trash on all mounted volumes and the main HDD
# Also, clear Apple’s System Logs to improve shell startup speed
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
# Hide/show all desktop icons (useful when presenting)
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
# 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'
# Ring the terminal bell, and put a badge on Terminal.app’s Dock icon
# (useful when executing time-consuming commands)
alias badge="tput bel"
# Lock the screen (when going AFK)
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# Copy my public key to the pasteboard
alias pubkey="more ~/.ssh/id_ed25519.pub | pbcopy | printf '=> Public key copied to pasteboard.\n'"
# Ping some hosts
alias p8="ping 8.8.8.8"
alias pg="ping google.de"
# Generate some save passwords
alias pwgen="pwgen --capitalize --numerals --symbols --secure 16"
# Wifi stuff
alias wifipass="security find-generic-password -g -D \"AirPort network password\" -w -a"
alias wifipow="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s"
# Multiple connections download
alias axel="axel -an 10"
# Ignore ssh config
alias ssh_ignore="ssh -F /dev/null"
# Some more stuff
alias starwars="telnet towel.blinkenlights.nl"
alias ubuntu="docker run --rm -ti ubuntu /bin/bash"
alias brewsync="ansible-playbook -i $HOME/.dotfiles/ansible/inventory $HOME/.dotfiles/ansible/dotfiles.yml --tags packages"
alias dotfiles="ansible-playbook -i $HOME/.dotfiles/ansible/inventory $HOME/.dotfiles/ansible/dotfiles.yml"
alias play="ansible-playbook"
alias smod='stat -c "%a %n"'