Skip to content

Instantly share code, notes, and snippets.

@danieldevine
Last active November 5, 2016 12:59
Show Gist options
  • Select an option

  • Save danieldevine/53e67c90697e7da17245675ea710fbe8 to your computer and use it in GitHub Desktop.

Select an option

Save danieldevine/53e67c90697e7da17245675ea710fbe8 to your computer and use it in GitHub Desktop.
Regular .bashrc (linux)
#########
# Aliases
#########
#saves wear on / key
alias www='cd /var/www'
#ls show hidden files. in colour
export LS_OPTIONS='--color=auto -a'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
#edit the hosts file
alias hosts='sudo atom /etc/hosts'
#edit the virtual hosts
alias vhosts='sudo atom /etc/apache2/sites-available/'
#too lazy to type git
alias push='git push'
alias pull='git pull'
#web shortcuts
alias trello='xdg-open https://trello.com/b/xxxxxx/development'
alias harvest='xdg-open https://xxxxxx.harvestapp.com'
alias bitbucket='xdg-open https://bitbucket.org'
alias drive='xdg-open https://drive.google.com/drive/my-drive'
alias cpanel='xdg-open http://cpanel.xxxxxx.com'
alias balsamiq='xdg-open https://xxxxxx.mybalsamiq.com'
#ssh login - requires sshpass
alias jerkshell='sshpass -p xxxxxxxxx ssh xxxxxx@xxxxxx.com'
###########
# Functions
###########
#open default web browser and point to url specified
web () { xdg-open http://"$1"; }
#open bitbucket at named repository
bbuck () { xdg-open https://bitbucket.org/xxxxxx/"$1"; }
#go to directory of given project
grobe () { cd /var/www/"$1"; }
#go to www directory and open in atom :)
upatom () { cd /var/www/"$1"; atom .; }
#git add and commit while sparing fingers and keyboard.
gurt () { git add --all && git commit -m "$*"; }
#git clone the lazy way
clone () { git clone https://xxxxxxxxx@bitbucket.org/xxxxxx/"$1"; }
#adds wp page with multi word titles enabled
wppage () { wp post create --post_type=page --post_title="'$@'"; }
#adds wp custom post type. Add args like 'custom post type name' then 'custom post type title'
wpcreate () { wp post create --post_type="$1" --post_title="'${@:2}'"; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment