-
Notifications
You must be signed in to change notification settings - Fork 1
/
aliases
46 lines (34 loc) · 1.57 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
#!/usr/bin/env bash
alias ll='ls -la'
# Easier navigation: .., ..., ~
alias ..="cd .."
alias ...="cd ../.."
alias ~="cd ~"
alias f='open .'
alias c='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code .'
alias n='nova .'
# Update All The Things
alias update='update-everything.sh'
# IP addresses
# https://unix.stackexchange.com/a/81699/37512
alias ip="dig @resolver4.opendns.com myip.opendns.com +short"
alias ip6="dig @resolver1.ipv6-sandbox.opendns.com AAAA myip.opendns.com +short -6"
alias iplocal="ipconfig getifaddr en0"
# Copy SSH public key to pasteboard
alias pubkey='more ~/.ssh/id_rsa.pub | pbcopy | printf "✓ Public SSH key copied to pasteboard.\n"'
# Copy GPG public key to pasteboard
alias gpgpubkey='gpg --export --armor $GPG_KEY_ID | pbcopy | printf "✓ Public GPG key copied to pasteboard.\n"'
# 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"
# Show/hide hidden files in Finder
alias show="defaults write com.apple.Finder AppleShowAllFiles -bool TRUE && killall Finder"
alias hide="defaults write com.apple.Finder AppleShowAllFiles -bool FALSE && killall Finder"
# When there's need for nyaning around
alias nyan="telnet nyancat.dakko.us"
# Virus scan with ClamAV
alias virusscan="clamscan -r --bell -i /"
# Docker & Docker Compose
alias dc="docker-compose"