2016-10-14 21:59:34 +02:00
|
|
|
|
#!/usr/bin/env bash
|
2012-07-15 05:26:24 +02:00
|
|
|
|
alias ll='ls -la'
|
|
|
|
|
|
2015-01-13 16:26:46 +01:00
|
|
|
|
# Easier navigation: .., ..., ~
|
|
|
|
|
alias ..="cd .."
|
|
|
|
|
alias ...="cd ../.."
|
|
|
|
|
alias ~="cd ~"
|
|
|
|
|
|
2019-06-08 02:42:18 +02:00
|
|
|
|
alias f='open .'
|
2017-10-16 17:02:02 +02:00
|
|
|
|
alias c='/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code .'
|
2012-07-15 05:26:24 +02:00
|
|
|
|
|
|
|
|
|
# Update All The Things
|
2014-11-03 17:40:13 +01:00
|
|
|
|
alias update='update-everything.sh'
|
2012-07-15 05:26:24 +02:00
|
|
|
|
|
2015-01-13 16:26:46 +01:00
|
|
|
|
# IP addresses
|
|
|
|
|
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
|
|
|
|
|
alias localip="ipconfig getifaddr en1"
|
|
|
|
|
|
2017-05-21 00:27:04 +02:00
|
|
|
|
# Copy SSH public key to pasteboard
|
2019-06-08 02:42:18 +02:00
|
|
|
|
alias pubkey='more ~/.ssh/id_rsa.pub | pbcopy | printf "✓ Public SSH key copied to pasteboard.\n"'
|
2017-05-21 00:27:04 +02:00
|
|
|
|
|
|
|
|
|
# Copy GPG public key to pasteboard
|
2019-06-08 02:42:18 +02:00
|
|
|
|
alias gpgpubkey='gpg --export --armor $GPG_KEY_ID | pbcopy | printf "✓ Public GPG key copied to pasteboard.\n"'
|
2015-01-13 16:26:46 +01:00
|
|
|
|
|
2012-07-15 05:26:24 +02:00
|
|
|
|
# Recursively delete `.DS_Store` files
|
|
|
|
|
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
|
|
|
|
|
|
2014-05-23 16:34:51 +02:00
|
|
|
|
# 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"
|
|
|
|
|
|
2012-07-15 05:26:24 +02:00
|
|
|
|
# Show/hide hidden files in Finder
|
2013-10-06 21:16:23 +02:00
|
|
|
|
alias show="defaults write com.apple.Finder AppleShowAllFiles -bool TRUE && killall Finder"
|
2015-06-04 20:34:31 +02:00
|
|
|
|
alias hide="defaults write com.apple.Finder AppleShowAllFiles -bool FALSE && killall Finder"
|
|
|
|
|
|
2015-06-18 00:43:54 +02:00
|
|
|
|
# When there's need for nyaning around
|
|
|
|
|
alias nyan="telnet nyancat.dakko.us"
|
2018-03-01 22:39:58 +01:00
|
|
|
|
|
|
|
|
|
# Virus scan with ClamAV
|
|
|
|
|
alias virusscan="clamscan -r --bell -i /"
|
2018-09-20 22:50:11 +02:00
|
|
|
|
|
|
|
|
|
# Docker & Docker Compose
|
|
|
|
|
alias dc="docker-compose"
|