Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@anandpdoshi
Created March 1, 2016 10:04
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 anandpdoshi/4fb4e8262e527b637a08 to your computer and use it in GitHub Desktop.
Save anandpdoshi/4fb4e8262e527b637a08 to your computer and use it in GitHub Desktop.
startdev() {
mysql.server start
}
stopdev() {
mysql.server stop
}
# git
alias gs="git status -s"
alias ga="git add"
alias gap="git add -p"
alias gc="git commit"
alias gpl="git pull --rebase frappe HEAD"
alias gdw="git diff --word-diff"
alias gdc="git diff --cached"
alias gdcw="git diff --cached --word-diff"
# github
alias pullhub="hub pull-request -b frappe:develop -h anandpdoshi:\$(current_branch)"
pullreq() {
# pull request to frappe organization to a particular branch instead of develop
hub pull-request -b frappe:$1 -h anandpdoshi:$(current_branch)
}
alias pushme="git push origin HEAD"
alias pushup="git push upstream HEAD"
alias pullup="git pull --rebase upstream HEAD"
alias uc="uncommitted ."
alias cdbench='cd ~/dev/work/frappe-bench'
alias rmpyc='find . -name "*.pyc" -exec rm -rf {} \;'
alias smtpd="sudo python -m smtpd -n -c DebuggingServer localhost:25"
benchstatus() {
ls -1 | xargs -n1 -I{app} sh -c 'cd {app} && echo "-----" && echo {app} && echo "-----" && git status -s && cd ..'
}
# I don't like shared command history between tabs, as it messes up my up arrow memory
unsetopt share_history
# simple python server
serve() {
python -m SimpleHTTPServer $1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment