Last active
October 3, 2023 06:18
-
-
Save bmadigan/73c266c21318c57fac77d95beba2303e to your computer and use it in GitHub Desktop.
ZSH Aliases
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
# Misc | |
# -------------------------------------------- | |
alias s="subl" | |
alias rip="rm -rf" | |
alias vc="code" | |
alias p="pstorm" | |
alias dev="cd ~/dev" | |
alias codee="cd ~/Dropbox/Code" | |
alias c="composer" | |
alias cu="COMPOSER_MEMORY_LIMIT=-1 composer update" | |
alias cr="COMPOSER_MEMORY_LIMIT=-1 composer require" | |
alias linter="composer styles:fix" | |
alias ci="composer install" | |
alias cda="composer dump-autoload -o" | |
alias shrug="echo '¯\\_(ツ)_/¯' && echo '¯\\_(ツ)_/¯' | pbcopy" | |
alias watch="npm run watch" | |
alias flip="echo '(╯°□°)╯︵ ┻━┻' && echo '(╯°□°)╯︵ ┻━┻' | pbcopy" | |
# PHPUnit | |
# -------------------------------------------- | |
alias tt="vendor/bin/phpunit" | |
alias pest="./vendor/bin/pest" | |
alias p="./vendor/bin/pest" | |
# PHP | |
# -------------------------------------------- | |
# PHP | |
alias switch-php80="brew unlink php@7.4 && brew link --overwrite --force php" | |
alias switch-php74="brew unlink php && brew link --overwrite --force php@7.4" | |
# Laravel | |
# -------------------------------------------- | |
alias tinker="php artisan tinker" | |
alias routes="php artisan route:list" | |
alias art="php artisan" | |
alias serve="php artisan serve" | |
alias migrate="php artisan migrate" | |
alias seed="php artisan db:seed" | |
alias scaffold="art db:seed --class Scaffold" | |
alias mfs="art migrate:fresh && art db:seed" | |
alias deploy='envoy run deploy' | |
alias deploy-code='envoy run deploy-code' | |
alias vapor="vendor/bin/vapor" | |
alias vaporg="sudo /Users/brad/.composer/vendor/laravel/vapor-cli/vapor" | |
# Docker & Vessel | |
# -------------------------------------------- | |
# alias dcup="docker-compose up -d" | |
# Rebuild a Docker container | |
alias dcbuild="docker-compose up --build" | |
alias dc="docker-compose" | |
alias dcup="docker-compose up -d && docker-compose log -f" | |
# Stops the container - Does not delete ! | |
alias dcstop="docker-compose stop" | |
# DELETES the container | |
# alias dcdown="docker-compose down --rmi local" | |
# JavaScript | |
# -------------------------------------------- | |
alias jest="./node_modules/.bin/jest" | |
# GIT | |
# -------------------------------------------- | |
alias ga="git add" | |
alias gaa="git add ." | |
alias gc="git commit -m " | |
alias gp="git push" | |
alias gpl="git pull" | |
alias gs="git status" | |
# Update from parent branch (Must be master) | |
# Pull in upstream changes as often as possible | |
alias gfetch="git fetch; git rebase origin/master;" | |
# Undo everything I just did from the last commit | |
alias nah="git reset --hard; git clean -df;" | |
# Need a fresh commit | |
alias wip="git add .; git commit -m 'WIP';" | |
# Mac / OSX | |
# -------------------------------------------- | |
alias sshkey='pbcopy < ~/.ssh/id_rsa.pub' | |
alias ll="ls -lah" | |
alias hostfile="sudo vi /etc/hosts" | |
alias c="clear" | |
alias refresh="source ~/.zshrc" | |
# ------ 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" | |
# ------ IP addresses | |
alias ip="dig +short myip.opendns.com @resolver1.opendns.com" | |
alias localip="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment