Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
bash aliases - July 2018
# Some Crazy Cool Aliases
## SSH Aliases
alias staging="ssh colin@"
alias staging-sync="ssh colin@"
alias production="ssh colin@"
alias production-sync="ssh colin@"
alias edithosts="sudo code /etc/hosts" # Edit Hosts file
alias editvhosts="sudo code /etc/apache2/extra/httpd-vhosts.conf" # Edit Virtual Hosts
alias editbash="code ~/.bash_profile" # Edit bash profile
alias savebash="source ~/.bash_profile" # Save bash profile
alias savebashrc="source ~/.bashrc" # Save bash rc
## MySQL commands
alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start; afplay ~/Music/booty.mp3'
alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'
## Apache
alias restartApache='sudo apachectl restart'
alias editApache='sudo code /etc/httpd/httpd.conf' # apacheEdit: Edit httpd.conf
alias apacheLogs="less +F /var/log/apache2/error_log" # Apachelogs: Shows apache error logs
## Finder
alias showhiddenfiles='defaults write AppleShowAllFiles TRUE;killall Finder'
alias hidehiddenfiles='defaults write AppleShowAllFiles FALSE;killall Finder'
## Git Aliases
alias gs="git status"
alias gp="git pull"
alias gpom="git pull origin"
alias gc="git commit -am"
alias gca="git commit --amend -m"
alias gco="git checkout"
alias gcob="git checkout -b"
alias gb="git branch -a"
alias gppo="git push origin"
alias gppom="git push origin master"
alias gppos="git push origin staging"
alias gppop="git push origin production"
## Grunt Aliases
alias gr="grunt"
alias grb="grunt build"
alias grp="grunt production"
alias gw="grunt watch"
alias grl="grunt less"
## Folder Aliases
alias b="cd ~/Sites/plain/barley"
alias bt="cd ~/Sites/plain/barley_templates"
alias r="cd ~/Sites/plain/root"
alias v="cd ~/Sites/plain/vagrant"
alias vu="cd ~/Sites/plain/vagrant; vagrant up; afplay ~/Music/booty.mp3"
alias vh="cd ~/Sites/plain/vagrant; vagrant halt"
## Unmark folders and deployment
alias u="cd ~/Sites/unmark"
alias ui="cd ~/Sites/unmark-internal"
## Unmark : Deploy app, and internal to staging
alias uds="cd ~/Sites/unmark-internal; bundle exec cap unmark-os:staging deploy; afplay ~/Music/booty.mp3"
alias udsp="cd ~/Sites/unmark-internal; bundle exec cap unmark-internal:staging deploy; afplay ~/Music/booty.mp3"
## Unmark: Deploy app, and internal to Production
alias udp="cd ~/Sites/unmark-internal; bundle exec cap unmark-os:production deploy; afplay ~/Music/booty.mp3"
alias udip="cd ~/Sites/unmark-internal; bundle exec cap unmark-internal:production deploy; afplay ~/Music/booty.mp3"
## Unmark: Deploy both at same time to production
alias udall="cd ~/Sites/unmark-internal; bundle exec cap unmark-internal:production deploy; bundle exec cap unmark-os:production deploy; afplay ~/Music/booty.mp3"
alias wpthemes="cd ~/Sites/wordpress_themes"
alias wpplugins="cd ~/Sites/wordpress_plugins"
alias condron="cd ~/Sites/condron"
## T-Pain related
alias tpbooty="afplay ~/Music/booty.mp3"
alias myip='curl' # myip: Public facing IP Address
alias flushDNS='dscacheutil -flushcache' # flushDNS: Flush out the DNS Cache
goback() {
while [ "$count" -lt "$1" ];
let count=count+1
cd $str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment