Skip to content

Instantly share code, notes, and snippets.

@cdevroe
Created July 16, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdevroe/b1cb9e02dad3469d14c158a0b933526f to your computer and use it in GitHub Desktop.
Save cdevroe/b1cb9e02dad3469d14c158a0b933526f to your computer and use it in GitHub Desktop.
bash aliases - July 2018
# Some Crazy Cool Aliases
## SSH Aliases
alias staging="ssh colin@166.78.106.71"
alias staging-sync="ssh colin@162.209.55.135"
alias production="ssh colin@166.78.109.171"
alias production-sync="ssh colin@162.209.56.248"
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 com.apple.finder AppleShowAllFiles TRUE;killall Finder'
alias hidehiddenfiles='defaults write com.apple.finder 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 ip.appspot.com' # myip: Public facing IP Address
alias flushDNS='dscacheutil -flushcache' # flushDNS: Flush out the DNS Cache
goback() {
str=""
count=0
while [ "$count" -lt "$1" ];
do
str=$str"../"
let count=count+1
done
cd $str
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment