Created
November 27, 2016 10:31
-
-
Save dostiharise/dcb344cc246febe4899eff17ab18f567 to your computer and use it in GitHub Desktop.
My Bash Aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### | |
## Custom bash aliases | |
#### | |
## ubuntu house keeping | |
# restart wifi | |
alias wifi-fix='sudo service network-manager restart' | |
## local server | |
alias http-server-8000='python -m SimpleHTTPServer 8000' | |
## git workflow | |
# git sync dev branch | |
alias git-status='git status' | |
alias git-log='git log' | |
alias git-dev-sync='git checkout development && git pull upstream development && git push origin development' | |
alias git-dev-rebase='git rebase -i development' | |
alias git-rebase-continue='git rebase --continue' | |
alias git-rebase-abort='git rebase --abort' | |
alias git-orig-rm='find ./ -name "*.orig" | xargs rm' | |
alias git-branch-sync='git fetch upstream && git rebase upstream/development && git push' | |
alias git-branch-push='git rev-parse --abbrev-ref HEAD | xargs git push -u origin' | |
alias git-reset-hard='git reset --hard' | |
alias git-push-force='git push --force' | |
## mvn workflows | |
alias mvn-tomcat-run='mvn clean install tomcat7:run -DskipTests=true' | |
alias mvn-dev-build='mvn clean install -P development -DskipTests=true' | |
alias mvn-local-build='mvn clean install -DskipTests=true' | |
# mysql workflows | |
alias mysql-local='mysql -u user -p' | |
# grunt workflows | |
alias grunt-dev-build="grunt build-development" | |
alias grunt-dev-deploy="grunt deploy-development" | |
alias grunt-local-build="grunt build-local-debug" | |
## workspace aliases | |
alias cd-ws='cd ~/projects/workspace' | |
# random 32 char string. - Suitable for password generation | |
alias random-string-32='cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1' | |
# aws | |
alias rsync-logs-tomcat8='rsync -e "ssh -i ~/.ssh/mykey" -chavzP --stats user@instance:/var/log/tomcat8 ./' | |
# bash | |
alias bash-aliases-edit='vim ~/.bash_aliases && . ~/.bash_aliases' | |
alias bash-aliases-apply='. ~/.bash_aliases' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment