mirror of
https://github.com/jakejarvis/dotfiles.git
synced 2025-04-26 15:48:27 -04:00
91 lines
3.5 KiB
Bash
91 lines
3.5 KiB
Bash
# Enable aliases to be sudo'ed
|
|
alias sudo="sudo "
|
|
|
|
alias reload="source ~/.zshrc"
|
|
|
|
alias ll="ls -lah"
|
|
alias la="ls -a"
|
|
alias l="ls -lh"
|
|
|
|
alias cd..="cd .."
|
|
alias ..="cd .."
|
|
alias ...="cd ../.."
|
|
alias ....="cd ../../.."
|
|
alias ~="cd ~"
|
|
|
|
# My own creation! See: https://github.com/jakejarvis/simpip
|
|
alias ipv4="curl -4 simpip.com --max-time 1 --proto-default https --silent"
|
|
alias ipv6="curl -6 simpip.com --max-time 1 --proto-default https --silent"
|
|
alias ip="ipv4; ipv6"
|
|
alias iploc="ipconfig getifaddr en0"
|
|
alias ips="ip; ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
|
|
|
|
alias dns-clear="networksetup -setdnsservers Wi-Fi"
|
|
alias dns-check="networksetup -getdnsservers Wi-Fi"
|
|
alias dns-set="networksetup -setdnsservers Wi-Fi "
|
|
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
|
|
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
|
|
|
|
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
|
|
alias hosts="sudo $EDITOR /etc/hosts"
|
|
alias speed="wget -O /dev/null http://cachefly.cachefly.net/100mb.test"
|
|
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer"
|
|
|
|
# Update: brew, npm, gem, macos
|
|
alias update="brew update; brew upgrade; brew cask upgrade; brew cleanup; npm install npm -g; npm update -g; gem update --system; gem update; gem cleanup; sudo gem update --system; sudo gem update; sudo gem cleanup; sudo softwareupdate -ia --include-config-data;"
|
|
|
|
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
|
alias unhide="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
|
alias forcetrash="sudo rm -rf ~/.Trash /Volumes/*/.Trashes"
|
|
alias unq="sudo xattr -rd com.apple.quarantine"
|
|
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
|
|
|
alias displays="system_profiler SPDisplaysDataType"
|
|
alias cpu="sysctl -n machdep.cpu.brand_string"
|
|
alias screenfetch="neofetch"
|
|
|
|
alias ripfinder="sudo killall Finder"
|
|
alias ripdock="sudo killall Dock"
|
|
alias ripmenu="sudo killall SystemUIServer NotificationCenter"
|
|
|
|
alias finder="open -a Finder ./"
|
|
alias vs="code ./"
|
|
|
|
# required: https://github.com/github/hub
|
|
# `brew install hub`
|
|
alias git="hub"
|
|
alias gc="git commit -m" # + commit message
|
|
alias gca="git add . && git commit -m" # + commit message
|
|
alias gs="git status -sb"
|
|
alias gl="git log --pretty=short"
|
|
alias gd="git diff"
|
|
alias gds="git diff --staged"
|
|
alias gpom="git push origin master"
|
|
alias glom="git pull origin master"
|
|
alias gpo="git push origin" # + branch name
|
|
alias glo="git pull origin" # + branch name
|
|
alias gb="git checkout" # + branch name
|
|
alias gbn="git checkout -b" # + branch name
|
|
alias grm="git rebase -i origin/master"
|
|
alias gsub="git submodule update --recursive --remote"
|
|
alias gundo="git reset --soft HEAD~1"
|
|
alias gf="hub fork --remote-name=origin"
|
|
alias gpr="hub pull-request"
|
|
alias gsync="hub sync"
|
|
alias gopen="hub browse"
|
|
|
|
alias dc="docker-compose"
|
|
|
|
alias sshalt="ssh -p 2222"
|
|
alias moshalt="mosh --ssh=\"ssh -p 2222\""
|
|
|
|
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
|
|
alias watchos="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator\ \(Watch\).app"
|
|
|
|
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to clipboard.'"
|
|
|
|
alias ytdl="youtube-dl -f bestvideo+bestaudio"
|
|
alias ytmp3="youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 320K"
|
|
|
|
alias weather="curl -4 https://wttr.in/Boston"
|