Skip to content

Instantly share code, notes, and snippets.

@mediabeastnz
Last active December 10, 2016 16:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mediabeastnz/8851278 to your computer and use it in GitHub Desktop.
Save mediabeastnz/8851278 to your computer and use it in GitHub Desktop.
Terminal functions and aliases.
## You can add these to your ./Users/User/.bash_profile so they can be called while in terminal. ##
## Aliases ##
alias wget="curl -O"
alias hosts='sudo nano /private/etc/hosts'
alias mamp='sudo /Applications/MAMP/bin/apache2/bin/apachectl restart'
alias g='git'
alias gall='git add --all'
alias gpush='git push'
alias gpull='git pull'
alias gpp='git pull && git push'
alias gc='git commit -m'
alias gs='git status'
alias gl='git lg'
alias watch='bundle exec compass watch'
## Functions ##
## git Add, Commit and then Push ##
function gacp(){
if [ -n "$1" ]; then
git add --all && git commit -m "$1" && git push
else
echo 'Could not run command, please add a commit message! e.g. gacp "commit message"';
fi
}
## e.g. $ server username ##
function server1(){
ssh ${1}@111.111.11.11
}
function server2(){
ssh ${1}@111.111.11.11
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment