Skip to content

Instantly share code, notes, and snippets.

@alfonsfoubert
Created November 29, 2016 09:48
Show Gist options
  • Save alfonsfoubert/3e4cc1aeb019066b714c94ecbfed5f38 to your computer and use it in GitHub Desktop.
Save alfonsfoubert/3e4cc1aeb019066b714c94ecbfed5f38 to your computer and use it in GitHub Desktop.
# Change Prompt
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export PS1='\[\033[0;34m\]\w \[\033[1;92m\]$(__git_ps1 "(%s)")\[\033[0m\]\n→ '
# Set proper path
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
export PATH=$PATH:/Users/alfons/bin
# System Aliases
alias ll='ls -l'
alias path='echo -e ${PATH//:/\\n}'
alias grep='grep --color=auto'
# up 'n' folders
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
# lock computer
alias lock='/System/Library/CoreServices/"Menu Extras"/User.menu/Contents/Resources/CGSession -suspend'
# hibernation and sleep settings
alias hibernate='sudo pmset -a hibernatemode 25'
alias sleep='sudo pmset -a hibernatemode 0'
alias safesleep='sudo pmset -a hibernatemode 3'
alias smartsleep='sudo pmset -a hibernatemode 2'
# ip
alias myip="curl ip.appspot.com"
# refresh shell
alias reload='source ~/.bash_profile'
# git
source /usr/local/etc/bash_completion.d/git-completion.bash
source ~/.git-prompt.sh
# Golang
export GOROOT=/usr/local/go
export GOPATH=$HOME/.go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
# Node Version Manager
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment