Skip to content

Instantly share code, notes, and snippets.

@timwright12
Last active March 6, 2019 13:35
Show Gist options
  • Save timwright12/724f61cc1b7c758fe5ffaa0ca5fa1983 to your computer and use it in GitHub Desktop.
Save timwright12/724f61cc1b7c758fe5ffaa0ca5fa1983 to your computer and use it in GitHub Desktop.
# Terminal Alias
PS1='\n\W\n[\h][\u] -> '
# PATH updates
PATH=$PATH:/usr/local/bin
PATH=/usr/local/bin:$PATH
export PATH=~/.composer/vendor/bin:$PATH
# Command alias
alias edithosts='sudo vi /private/etc/hosts'
alias phpserver='php -S localhost:8000'
# Directory alias
alias localhost='cd ~/Desktop/Localhost'
alias sites='cd ~/Sites'
# WP Local Docker
alias dcwp='docker-compose exec --user www-data phpfpm wp'
alias dcbash='docker-compose exec --user root phpfpm bash'
alias dockerup='docker-compose up -d'
alias dockerdown='docker-compose down'
alias dockerstop='docker stop $(docker ps -a -q)'
alias dockerdelete='docker rm $(docker ps -a -q)'
alias dockerkill='docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)'
# USAGE: git-archive feature/branch-name
git-archive() {
git checkout $1
git tag archive/$1
git push origin archive/$1
git checkout master
git branch -D $1
git push origin :$1
}
# USAGE: git-upstream-set {{repo url}}
git-upstream-set() {
git remote add upstream $1
git fetch upstream
}
# USAGE: git-pull-fork 54 feature/whatever
git-pull-fork() {
git fetch origin pull/$1/head:$2
}
# Asset Downloading
alias placeholder='cd ~/Desktop && curl -O http://placehold.it/1200x600 && mv 1200x600 pl-1200x600.png && rm -f 1200x600'
alias placeholder_square='cd ~/Desktop && curl -O http://placehold.it/500x500 && mv 500x500 pl-500x500.png && rm -f 500x500'
alias placeholder_thumb='cd ~/Desktop && curl -O http://placehold.it/100x100 && mv 100x100 pl-100x100.png && rm -f 100x100'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment