Last active
April 29, 2022 20:20
-
-
Save smchenrybc/3ebca766e8e21f48897157a25987ede2 to your computer and use it in GitHub Desktop.
Oh My Zsh setup
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 # | |
########### | |
# Afplay | |
alias afp='afplay' | |
# Base64 | |
alias b64="base64" | |
alias base64='echo `echo "$1" | base64 --decode`' | |
# 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 bun="brew uninstall" | |
alias bupd="brew update" | |
alias bupg="brew upgrade" | |
alias fixbrewperms="sudo chown -R $(whoami) $(brew --prefix)/*" | |
# Composer | |
alias composer="php /usr/local/bin/composer.phar" | |
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 Icons | |
alias fixicons="sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder" | |
# Fix Open With | |
alias openwithfix="/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -seed -r -f -v -domain local -domain user -domain system" | |
# Fix Thumbs | |
alias fixthumbs="qlmanage -r cache && killall Finder" | |
# Fish | |
alias fishconf="mate ~/.config/fish/config.fish" | |
alias fishconfig="mate ~/.config/fish/config.fish" | |
alias openfish="mate ~/.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 gdfh="git diff HEAD^ HEAD" | |
alias gdfs="git diff --staged" | |
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 gpom="git push --set-upstream origin master" | |
alias gprb="git pull --rebase" | |
alias gpsu="git push --set-upstream origin master" | |
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 grro="git remote rm origin" | |
alias grv="git remote -v" | |
alias gs="git status" | |
alias gsp="git stash pop" | |
# Grunt | |
alias gb="grunt build" | |
alias gd="grunt dev" | |
alias gw="grunt watch" | |
alias gsl="grunt stylelint" | |
# Hide & Unhide | |
alias hfhide="defaults write com.apple.finder AppleShowAllFiles NO" | |
alias hfshow="defaults write com.apple.finder AppleShowAllFiles YES" | |
alias hide="chflags hidden" | |
alias unhide="chflags nohidden" | |
# Hyper | |
alias hyperconf="mate -w ~/.hyper.js" | |
alias hyperconfig="mate -w ~/.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 mysql@5.7" | |
alias sqlstop="brew services stop mysql@5.7" | |
alias sqlrestart="brew services restart mysql@5.7" | |
# NPM | |
alias nin="npm install" | |
alias nins="npm install --save" | |
alias ninsd="npm install --save-dev" | |
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 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"' | |
# Rsync | |
alias rcopy='rsync -ahP' | |
alias rscopy='rsync -ahP' | |
# Sass | |
alias fixsass="npm rebuild node-sass --force" | |
# Scrcpy | |
alias screen='scrcpy' | |
# Secure Remove | |
alias srm="rm -Pv" | |
alias srmd="rm -Pvrf" | |
alias srmf="rm -Pvrf" | |
# Skim | |
alias skim='open -a "Skim"' | |
# Soulseek | |
alias soulseek='fopen ~/TEMP/Downloads/Soulseek/' | |
# Spotify | |
alias clearspotify="cd ~/Library/Application\ Support/Spotify/PersistentCache/Storage && rm -rf * && cd -" | |
# SSH | |
alias ssh-del="ssh-add -D" | |
alias ssh-gen="ssh-keygen -t rsa -b 4096 -C" | |
# System | |
alias bootchimeoff="sudo nvram SystemAudioVolume=%01; say boot chime is now off" | |
# Terminus | |
alias terminus="/Users/sean/.terminus/bin/terminus" | |
# 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 vconfig="subl ~/.config/valet" | |
alias vlink="valet park" | |
alias vpark="valet park" | |
alias vsec="valet secure" | |
alias vstart="valet start" | |
alias vstop="valet stop" | |
# WP CLI | |
alias wcd="wp core download" | |
# Yarn | |
alias yin="yarn install" | |
alias yupg="yarn upgrade" | |
# ZSH | |
alias ohmyzsh="subl ~/.oh-my-zsh" | |
alias omzconf="subl ~/.zshrc" | |
alias zshconf="subl ~/.zsh_profile" | |
alias zshrel="source ~/.zshrc" | |
########## | |
# CONFIG # | |
########## | |
# fix % appearing before cursor in Hyper | |
unsetopt PROMPT_SP | |
######### | |
# PATHS # | |
######### | |
export PATH="/usr/local/bin:$PATH" | |
export PATH="/usr/local/mysql/bin:$PATH" | |
export PATH="/Users/sean/.npm-packages/bin:$PATH" | |
export PATH="~/.composer/vendor/bin:$PATH" | |
export PATH="/usr/local/sbin:$PATH" |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/sean/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" | |
# Set list of themes to pick from when loading at random | |
# Setting this variable when ZSH_THEME=random will cause zsh to load | |
# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ | |
# If set to an empty array, this variable will have no effect. | |
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" | |
# Uncomment the following line to use hyphen-insensitive completion. | |
# Case-sensitive completion must be off. _ and - will be interchangeable. | |
# HYPHEN_INSENSITIVE="true" | |
# Uncomment the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to automatically update without prompting. | |
# DISABLE_UPDATE_PROMPT="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=13 | |
# Uncomment the following line if pasting URLs and other text is messed up. | |
# DISABLE_MAGIC_FUNCTIONS=true | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
# ENABLE_CORRECTION="true" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# You can set one of the optional three formats: | |
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# or set a custom format using the strftime function format specifications, | |
# see 'man strftime' for details. | |
# HIST_STAMPS="mm/dd/yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
# Which plugins would you like to load? | |
# Standard plugins can be found in ~/.oh-my-zsh/plugins/* | |
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=(git zsh-autosuggestions) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
source ~/.zsh_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment