Skip to content

Instantly share code, notes, and snippets.

@BideoWego
Created June 8, 2018 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BideoWego/bce3e9b1dc1f21b51ebe9961229eb78f to your computer and use it in GitHub Desktop.
Save BideoWego/bce3e9b1dc1f21b51ebe9961229eb78f to your computer and use it in GitHub Desktop.
My Windows Dotfiles
echo ''
echo "Hello $(whoami)!"
echo ''
# ------------------------------------
# Directory Shortcuts
# ------------------------------------
alias back='cd $OLDPWD'
alias up='cd ..'
alias home='cd ~'
alias desktop='cd ~/Desktop'
alias documents='cd ~/Documents'
# ------------------------------------
# Command Shorthands
# ------------------------------------
alias ll='ls -lahGF'
alias c='clear'
alias h='history'
# ------------------------------------
# Rewrite Commands
# ------------------------------------
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'
alias rm!='sudo rm'
alias rmdir='rm -iR'
alias rmdir!='sudo rm -R'
alias df='df -h'
alias du='du -h'
alias mkdir='mkdir -v -p'
# ------------------------------------
# Node/NPM
# ------------------------------------
alias node="winpty node"
alias npm="node C:/Program\ Files/nodejs/node_modules/npm/bin/npm-cli.js"
# ----------------------------------------
# Version Control
# ----------------------------------------
alias github='start https://github.com'
alias bitbucket='start https://bitbucket.org'
# ------------------------------------
# VS Code
# ------------------------------------
alias code='/c/Program\ Files/Microsoft\ VS\ Code/bin/code'
# ------------------------------------
# Bash Git Prompt
# ------------------------------------
GIT_PROMPT_ONLY_IN_REPO=1
source ~/.bash-git-prompt/gitprompt.sh
# ------------------------------------
# Functions
# ------------------------------------
# man
function man() {
if [ "$1" ]; then
$1 --help | less
else
echo "Please enter a command"
fi
}
# localhost
function localhost {
PORT='3000'
if [ $1 ]; then
PORT="$1"
fi
start "http://localhost:$PORT"
}
alias localhost='localhost'
# ------------------------------------
# PATH
# ------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment