Skip to content

Instantly share code, notes, and snippets.

@nkt217
Last active January 24, 2019 11:48
Show Gist options
  • Save nkt217/739ef6c2e53963b9315ca8d87abbfdfb to your computer and use it in GitHub Desktop.
Save nkt217/739ef6c2e53963b9315ca8d87abbfdfb to your computer and use it in GitHub Desktop.
001-development-environment-setup
# Usage: curl -L https://gist.github.com/tomarak/f87b97bb84080907aaa4.sh | zsh && chsh -s $(which zsh)
# sudo apt-get install git zsh wget curl
# chmod 777 prezto-install.sh
# ./prezto-install
echo "Cloning prezto"
rm -rf "${ZDOTDIR:-$HOME}/.zprezto"
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
echo "Symlinking all requires zsh dot files"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
targetfile=${ZDOTDIR:-$HOME}/.${rcfile:t}
rm -f "$targetfile"
ln -s "$rcfile" "$targetfile"
done
# echo "Include git prezto module"
# sed -i "s/'prompt'/'prompt' 'git'/" ${ZDOTDIR:-$HOME}/.zpreztorc
# echo "Remove git aliases from the git prezto module"
# sed -i '/^alias/d' ${ZDOTDIR:-$HOME}/.zprezto/modules/git/alias.zsh
echo "done"
# Customize to your needs...
export PY_USER_BIN='/home/ankitv/.local/lib/python3.6/site-packages'
export PATH=$PY_USER_BIN:$PATH
export DOCKER_HOST=tcp://localhost:2375
# -- navigations --
alias educanon="cd /c/Users/AnkitV/Work/001-educanon/educanonllx"
alias exp="cd /c/Users/AnkitV/Work/001-educanon/express"
alias ceorater="cd /c/Users/AnkitV/Work/002-scoprire/ceorater"
alias personal="cd /c/Users/AnkitV/Work/000-personal"
alias cb="cd /c/Users/AnkitV/Work/004-cloudbloom"
alias dac="cd /c/Users/AnkitV/Work/006-dac"
alias listaws="cd /c/Users/AnkitV/Work/000-personal/001-aws"
alias work="cd /c/Users/AnkitV/Work"
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# alias /="cd /"
# -- git commands --
alias gb='git branch'
alias gbc='git checkout -b'
alias gbl='git branch -v'
alias gbL='git branch -av'
alias gbx='git branch -d'
alias gbX='git branch -D'
alias gbm='git branch -m'
alias gbM='git branch -M'
alias gbs='git show-branch'
alias gbS='git show-branch -a'
alias gc='git commit --verbose'
alias gca='git commit --verbose --all'
alias gcm='git commit --message'
alias gco='git checkout'
alias gcr='git revert'
alias gcR='git reset "HEAD^"'
alias gf='git fetch'
alias gfc='git clone'
alias gpl='git pull'
alias gfr='git pull --rebase'
alias gm='git merge'
alias gmC='git merge --no-commit'
alias gmF='git merge --no-ff'
alias gma='git merge --abort'
alias gmt='git mergetool'
alias ga='git add'
alias gaa='git add -A'
# Push (p)
alias gp='git push'
alias gpf='git push --force'
alias gpa='git push --all'
alias gpA='git push --all && git push --tags'
alias gpt='git push --tags'
alias gpc='git push --set-upstream origin "$(git-branch-current 2> /dev/null)"'
alias gpp='git pull origin "$(git-branch-current 2> /dev/null)" && git push origin "$(git-branch-current 2> /dev/null)"'
# Rebase (r)
alias gr='git rebase'
alias gra='git rebase --abort'
alias grc='git rebase --continue'
alias gri='git rebase --interactive'
alias grs='git rebase --skip'
alias gsts='git stash'
alias gps='git push origin'
alias gpf='git push --force'
alias gpa='git push --all'
alias gpA='git push --all && git push --tags'
alias gpt='git push --tags'
alias gs='git status'
alias gd='git diff'
alias gcf='git clean -f'
alias gcn='git clean -n'
alias clean-branches='git branch --merged | egrep -v "(^\*|master|development|production|qa)" | xargs git branch -d'
# -- utility commands
alias re-source="source ~/.bashrc"
# -- rsync commands --
alias rsvermaapi='rsync -avz --delete --exclude=tmp/ --exclude=.git/ --exclude=node_modules/ --exclude=config.json --exclude=ecosystem.json /c/Users/AnkitV/Work/001-educanon/express/ ben@verma.eastus2.cloudapp.azure.com:/home/ben/production/express'
alias rsvermaphp='rsync -avz --delete --exclude=tmp/ --exclude=.git/ --exclude=.sass-cache/ --exclude=www/node/node_modules --exclude=globalConfig.json --exclude=www/static/js/app.js /c/Users/AnkitV/Work/001-educanon/educanonllx/ ben@verma.eastus2.cloudapp.azure.com:/home/ben/production/educanonllx'
# -- ssh commands --
alias sshankitc9="ssh ben@verma.eastus2.cloudapp.azure.com"
alias sshceorater="ssh ubuntu@52.4.157.48"
alias sshceoraterdev="ssh ubuntu@52.5.249.61"
# -- downloadlogs educanon --
# alias logsphp8="scp ben@php8.playposit.com:/home/logs/ChromeInfoWeek3* /c/Users/AnkitV/Work/001-educanon/logs-php8.log"
# alias logsphp6="scp ben@php6.playposit.com:/home/logs/ChromeInfoWeek3* /c/Users/AnkitV/Work/001-educanon/logs-php6.log"
# alias logsapi2="scp ben@api2.playposit.com:/home/ben/.pm2/logs/playposit-apis* /c/Users/AnkitV/Work/001-educanon/logs-api2.log"
# alias logsapi4="scp ben@api4.playposit.com:/home/ben/.pm2/logs/playposit-apis* /c/Users/AnkitV/Work/001-educanon/logs-api4.log"
# -- other commands
# alias pp-sass="sass --watch ./www/static/scss:./www/static/css --style compressed"
# -- youtube-dl scripts --
alias downloadmp3-playlist="youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 -o '%(title)s.%(ext)s' "
# alias logsapi4="scp ben@api4.playposit.com:/home/ben/.pm2/logs/playposit-apis* /mnt/c/Users/AnkitV/Work/001-educanon/logs-api4.log"
# -- downloadlogs educanon --
# -- other commands
alias pp-sass="sass --watch ./www/static/scss:./www/static/css --style compressed"
# -- youtube-dl scripts --
alias downloadmp3-playlist="youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 -o '%(title)s.%(ext)s' "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment