Skip to content

Instantly share code, notes, and snippets.

@bitflower
Last active January 26, 2018 08:23
Show Gist options
  • Save bitflower/3e39f3f0de63b8be3321ced9af51c97a to your computer and use it in GitHub Desktop.
Save bitflower/3e39f3f0de63b8be3321ced9af51c97a to your computer and use it in GitHub Desktop.
export PATH=/usr/local/bin:$PATH
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
# NVM (Node version manager)
export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
. "$(brew --prefix nvm)/nvm.sh"
# JAVA / ANDROID
#export ANDROID_HOME=/usr/local/opt/android-sdk
#export JAVA_HOME=/Library/Java/Home
# ALIASES
alias b='sublime ~/.bash_profile' # b: Opens my -bash_profile
alias f='open -a Finder ./' # f: Opens current directory in MacOS Finder
mcd () { mkdir -p "$1" && cd "$1"; } # mcd: Makes new Dir and jumps inside
alias DT='tee ~/Desktop/terminalOut.txt' # DT: Pipe content to file on MacOS Desktop
alias ~="cd ~" # ~: Go Home
gco () { # gco: Clone git repo, change to folder and open it in VS Code
# Clone the repo
git clone "$1";
# Extract the folder name
str="$1";
value=${str##*/};
# echo "$value";
# Change dir to folder
cd "$value";
# Open folder in VS Code
code .;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment