Last active
December 17, 2022 21:10
-
-
Save seankmchenry/19b88061b5a6526e1aaff369e29ff0fd to your computer and use it in GitHub Desktop.
ZSH functions, aliases and paths
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### | |
# ALIASES # | |
########### | |
# Brew | |
alias bcin="brew install --cask" | |
alias bcri="brew reinstall --cask" | |
alias bcun="brew uninstall --cask" | |
alias bin="brew install" | |
alias bs="brew search" | |
alias bsl="brew services list" | |
alias bsr="brew services restart" | |
alias bun="brew uninstall" | |
alias bupd="brew update" | |
alias bug="brew upgrade" | |
# Composer | |
alias cin="composer install" | |
alias cup="composer update" | |
# DNS | |
alias flushdns="sudo killall -HUP mDNSResponder; say cache flushed" | |
# .DS_Store files | |
alias rmds="find . -name '.DS_Store' -type f -delete" | |
alias rmdsstore="find . -name '.DS_Store' -type f -delete" | |
# Ethernet | |
alias ethup="sudo ifconfig en0 up" | |
alias ethdown="sudo ifconfig en0 down" | |
# Fix Thumbs | |
alias fixthumbs="qlmanage -r cache && killall Finder" | |
# Fish | |
alias fishconf="subl -nw ~/.config/fish/config.fish" | |
# Git | |
alias gaa="git add -A" | |
alias gbr="git branch" | |
alias gbrd="git branch -d" | |
alias gc="git commit" | |
alias gca="git commit --amend" | |
alias gcl="git clone" | |
alias gcm="git commit -m" | |
alias gco="git checkout" | |
alias gdf="git diff" | |
alias gdfc="git diff --cached" | |
alias gi="git init" | |
alias gl="git log" | |
alias godf="git difftool --tool='opendiff'" | |
alias gp="git push" | |
alias gpa="git push --all" | |
alias gpf="git push -f" | |
alias gpl="git pull" | |
alias gprb="git pull --rebase" | |
alias gra="git remote add" | |
alias grao="git remote add origin" | |
alias grb="git rebase" | |
alias grbc="git rebase --continue" | |
alias grbs="git rebase --skip" | |
alias grh="git reset --hard" | |
alias grmc="git rm --cached" | |
alias grr="git remote rm" | |
alias grv="git remote -v" | |
alias gs="git status" | |
alias gsp="git stash pop" | |
alias gufm="git config --unset core.filemode" | |
# Grunt | |
alias gb="grunt build" | |
alias gd="grunt dev" | |
alias gw="grunt watch" | |
alias gsl="grunt stylelint" | |
# Hide & Unhide | |
alias hide="chflags hidden" | |
alias unhide="chflags nohidden" | |
# Hyper | |
alias hyperconf="subl -nw ~/.hyper.js" | |
# Kill | |
alias killui="sudo killall -KILL Dock SystemUIServer Finder" | |
alias killfinder="sudo killall -KILL Finder" | |
# MP3val | |
alias mp3="mp3gain && mp3val" | |
alias mp3gain="find . -type f -iname '*.mp3' -print0 | xargs -0 mp3gain -c -p -r -d 0.0" | |
alias mp3val="find . -type f -iname '*.mp3' -print0 | xargs -0 mp3val -f -nb -t" | |
# MySQL | |
alias sqlstart="brew services start [email protected]" | |
alias sqlstop="brew services stop [email protected]" | |
alias sqlrestart="brew services restart [email protected]" | |
# NPM | |
alias nin="npm install" | |
alias nrb="npm run build" | |
alias nrd="npm run dev" | |
alias nrp="npm run prod" | |
alias nrw="npm run watch" | |
alias nun="npm uninstall" | |
alias nup="npm update" | |
alias nccf="npm cache clean --force" | |
alias ninsd="npm install --save-dev" | |
alias nunsd="npm uninstall --save-dev" | |
# Open with Finder | |
alias fopen="open -a 'Finder'" | |
# PHP | |
alias clearfpmlog="rm /usr/local/var/log/php-fpm.log && touch /usr/local/var/log/php-fpm.log" | |
# Preview | |
alias prev="open -a 'Preview'" | |
alias preview="open -a 'Preview'" | |
# Scrcpy | |
alias screen="scrcpy" | |
# Secure Remove | |
alias srm="rm -Pv" | |
alias srmd="rm -Pvrf" | |
alias srmf="rm -Pvrf" | |
# Skim | |
alias skim="open -a 'Skim'" | |
# Spotify | |
# alias clearspotify="cd ~/Library/Application\ Support/Spotify/PersistentCache/Storage && rm -rf * && cd -" | |
alias clearspotify="rm -rf ~/Library/Application\ Support/Spotify/PersistentCache/Storage/*" | |
# SSH | |
alias ssh-del="ssh-add -D" | |
alias ssh-gen="ssh-keygen -t rsa -b 4096 -C" | |
# Vagrant | |
alias vag-bod="vagrant box outdated" | |
alias vag-bup="vagrant box update" | |
alias vag-halt="vagrant halt" | |
alias vag-ssh="vagrant ssh" | |
alias vag-sus="vagrant suspend" | |
alias vag-up="vagrant up" | |
# Valet | |
alias vlink="valet link" | |
alias vpark="valet park" | |
alias vsec="valet secure" | |
alias vstart="valet start" | |
alias vstop="valet stop" | |
alias valetconf="subl -nw ~/.config/valet/config.json" | |
# WP CLI | |
alias wcd="wp core download" | |
# Yarn | |
alias yin="yarn install" | |
alias yug="yarn upgrade" | |
# ZSH | |
alias zshconf="subl -nw ~/.zsh_profile" | |
alias zshrel="source ~/.zsh_profile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!