Skip to content

Instantly share code, notes, and snippets.

@cagcak
Last active December 18, 2018 12:25
Show Gist options
  • Save cagcak/8806db04cb1448b83b8d8fb9c1bbe42d to your computer and use it in GitHub Desktop.
Save cagcak/8806db04cb1448b83b8d8fb9c1bbe42d to your computer and use it in GitHub Desktop.
Common bash aliases
alias update-ubuntu='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y'
alias make-git-ignore='cp ~/.gitignore_global .gitignore'
alias v-up='cd ~/Homestead && vagrant up'
alias make-eslint='cp ~/.eslintrc_global .eslintrc'
alias homestead-config='nano ~/homestead/Homestead.yaml'
alias run-vagrant='CWD="$(pwd)" && cd ~/homestead && vagrant reload --provision && vagrant up && cd $(echo $CWD)'
alias homestead-bash='CWD="$(pwd)" && cd ~/homestead && vagrant ssh && cd $(echo $CWD)'
alias vm='ssh vagrant@127.0.0.1 -p 2222'
alias set-alias='sudo nano ~/.bash_aliases && source ~/.bash_aliases'
alias terminate-all='vagrant halt && shutdown -h +1'
alias vagrant-status='CWD="$(pwd)" && cd ~/homestead && vagrant status && cd $(echo $CWD)'
alias help-alias='cat ~/.bash_aliases'
alias start-mongo='mongod --port 27018'
alias serve-projet='vagrant-status && run-vagrant && start-mongo'
alias kill-projet='CWD="$(pwd)" && cd ~/homestead && vagrant halt && cd $(echo $CWD) && vagrant-status'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment