Skip to content

Instantly share code, notes, and snippets.

@robwalch
Created January 14, 2014 16:57
Show Gist options
  • Save robwalch/8421667 to your computer and use it in GitHub Desktop.
Save robwalch/8421667 to your computer and use it in GitHub Desktop.
# history options
export HISTCONTROL=erasedups
export HISTSIZE=10000
export HISTIGNORE='&:ls:[bf]g:'
shopt -s histappend
export COMMAND_MODE=unix2003
# colors for misc things
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
# Set colors
export LS_COLORS='di=1;36:fi=0:ln=4;34:pi=5:so=4;5:bd=5:cd=5:or=4;91:mi=4;92:ex=35:*.rb=90'
# used in command prompt
NM="\[\033[0;38m\]" #means no background and white lines
HI="\[\033[0;37m\]" #change this for letter colors
HII="\[\033[0;31m\]" #change this for letter colors
SI="\[\033[0;33m\]" #this is for the current directory
IN="\[\033[0m\]"
## Command Prompt ##
if [ ${USER} == "root" ];then
export PS1="$HII\w$NM $ $IN"
fi
##### replace with your username
if [ ${USER} == "rwalch" ];then
#export PS1="$SI\w$NM $ $IN"
export PS1="$SI\w$NM $ $IN"
fi
# set terminal window title
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*} ${PWD}"; echo -ne "\007"'
# cd search paths
##### add project paths with subfolders you always cd into
export CDPATH='.:~:~/dev'
# short cuts
alias dev='cd ~/dev'
alias ..="cd .."
alias ...="cd .. ; cd .."
alias ls="ls -G" # list
alias la="ls -Ga" # list all, includes dot files
alias ll="ls -Gl" # long list, excludes dot files
alias lla="ls -Gla" # long list all, includes dot files
alias hs='history | grep $1'
alias grep='GREP_COLOR="1;37;41" LANG=C grep --color=auto'
alias hsvn='svn log -v | grep $1 -A 10 -B 10'
alias hsgit='git grep -n $1 $2'
# Apache server
alias tail-apache="tail -f /private/var/log/apache2/error_log"
alias tail-apache-access="tail -f /private/var/log/apache2/access_log"
alias apache-start="sudo /usr/sbin/apachectl start"
alias apache-restart="sudo /usr/sbin/apachectl restart"
alias apache-stop="sudo /usr/sbin/apachectl stop"
# Flash debug player logs. To enable see http://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.html
alias tail-flash="tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt"
alias cat-flash="cat ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt"
# alias tail-flash="tail -f ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt | grep -viE \"^updatetransform|^(update)?matrix|property 'prototype'|^model:\""
# alias cat-flash="cat ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt | grep -viE \"^updatetransform|^(update)?matrix|property 'prototype'|^model:\""
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment