Last active
August 29, 2015 14:15
-
-
Save damonsharp/b399b33470763bb2e2b2 to your computer and use it in GitHub Desktop.
Bash Profile Aliases & Other Goodies
This file contains hidden or 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
# Terminal visuals from http://osxdaily.com/2013/02/05/improve-terminal-appearance-mac-os-x/ | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
export EDITOR='subl' | |
# Keep at top | |
export PATH='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/.composer/vendor/bin' | |
# User defined aliases | |
# List files | |
alias lst="ls -la" | |
# Run artisan commands for Laravel using MAMP PHP | |
alias art='php artisan' | |
# Run artisan database migration commands using MAMP PHP | |
alias artm='php artisan migrate' | |
# Edit the hosts file for creating local virtual hosts | |
alias ehosts='subl /etc/hosts' | |
# Change directory to WP Development plugins | |
alias wpdevp='cd ~/Sites/wpdev/wp-content/plugins; ls -la' | |
# Change directory to WP Development themes | |
alias wpdevt='cd ~/Sites/wpdev/wp-content/themes; ls -la' | |
# Change directory to Sites (change to whatever directory you keep your local sites in) | |
alias sites='cd ~/Sites' | |
# Change to sites directory and list details of all sites | |
alias lsites='cd ~/Sites; ls -la' | |
# Empty the trash | |
alias etrash='sudo rm -rf ~/.Trash/*' | |
# Reload the ~/.profile file (this file - needed anytime new items are added) | |
alias reloadprof='. ~/.bash_profile' | |
# Edit this file in sublime | |
alias eprof='subl ~/.bash_profile' | |
# Flush DNS cache | |
alias flushdns="dscacheutil -flushcache" | |
# Apache | |
alias startapache="sudo apachectl start" | |
alias stopapache="sudo apachectl stop" | |
alias restartapache="sudo apachectl restart" | |
# Git | |
alias gitst="git status" | |
alias gita="git add" | |
alias gitaa="git add -A" | |
# add deleted files only | |
alias gitad="git ls-files --deleted | xargs git rm" | |
alias gitc="git commit -m" | |
alias gitaac="git add -A; git commit -m" | |
alias gitu="git add -u" | |
alias gitpom="git push origin master" | |
alias gitpu="git push" | |
alias gitplom="git pull origin master" | |
alias gitpl="git pull" | |
alias gits="git stage" | |
alias gitcl="git clone" | |
alias gitco="git checkout" | |
alias gitb="git branch" | |
alias copyssh="pbcopy < ~/.ssh/id_rsa.pub" | |
# Gulp tasks | |
alias gw="gulp watch" | |
# Laravel Homestead commands | |
alias hup="homestead up" | |
alias hupp="homestead up --provision" | |
alias hsus="homestead suspend" | |
alias hh="homestead halt" | |
alias hst="homestead status" | |
alias hlist="homestead list" | |
alias hdes="homestead destroy" | |
alias hedit="homestead edit" | |
alias hssh="homestead ssh" | |
# Vagrant commands | |
alias vup="vagrant up" | |
alias vsus="vagrant suspend" | |
alias vh="vagrant halt" | |
alias vst="vagrant status" | |
alias vlist="vagrant list" | |
alias vdes="vagrant destroy" | |
alias vprov="vagrant provision" | |
# WordPress | |
alias wptheme="mkdir source; touch index.php source/img source/js source/sass functions.php comments.php home.php front-page.php page.php search.php header.php footer.php archive.php single.php sidebar.php; chmodd775; chmodf664;" | |
# Node/NPM | |
alias updatenode="sudo npm cache clean -f; sudo npm install -g n; sudo n stable" | |
# WordPress | |
alias installwp="sites; git clone https://github.com/WordPress/WordPress.git" | |
# Change directory permissions only to 775 (recursivlely from current directory) | |
alias chmodd775='sudo find . -type d -exec chmod 775 {} +' | |
# Change file permissions only to 664 (recursively from current directory) | |
alias chmodf664='sudo find . -type f -exec chmod 664 {} +' | |
# Start up a php server on port 8000 | |
alias phpsrv='php -S localhost:8000' | |
# Create a new Laravel project (requires installer - "composer global require "laravel/installer=~1.1") | |
# cd into site root manually, then run "lnew projectname", etc. | |
alias lnew="laravel new" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: you need a symlink for the subl command above.