Skip to content

Instantly share code, notes, and snippets.

@ChrisLowe-Takor
Created July 23, 2018 07:14
Show Gist options
  • Save ChrisLowe-Takor/14911b156ba05746d681251a26a3bacd to your computer and use it in GitHub Desktop.
Save ChrisLowe-Takor/14911b156ba05746d681251a26a3bacd to your computer and use it in GitHub Desktop.
# Terminal color and style
export PS1="\[\033[36m\]\u:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Aliases
alias ll='ls -alGFh'
alias gemlist='gem list | egrep -v "^( |$)"'
alias hist="history | grep -E -v '^ *[0-9]+ *h ' | grep "
alias rtest='bundle exec rake test'
alias updatedb="sudo /usr/libexec/locate.updatedb"
alias kk='kubectl'
alias arefresh='adb shell am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///sdcard'
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias c='clear'
alias path='echo -e ${PATH//:/\\n}'
alias lock='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine'
alias screensaver='/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine'
alias hh="history|tail -10"
alias time='date +"%r"'
alias ..='cd ..'
alias ...='cd ../../..'
code () {
if [[ $# = 0 ]]
then
open -a "Visual Studio Code"
else
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}"
open -a "Visual Studio Code" --args "$F"
fi
}
# History
export HISTSIZE=1000000
export HISTFILESIZE=1000000
export HISTCONTROL=ignoredups:erasedups
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear:git -A*:git status:git log"
type shopt &> /dev/null && shopt -s histappend
shopt -s cmdhist
export HISTTIMEFORMAT='%F %T '
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
export BLOCKSIZE=1k
# Set finder to show hidden files
defaults write com.apple.finder AppleShowAllFiles TRUE
# Enable VI key bindings
set -o vi
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH="/usr/local/opt/gdal2/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment