Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update more aliases / dotfiles

  • Loading branch information...
commit 3c98b942aad2790f6883592da154bf54c8344ae9 1 parent 487d8dc
@catsby authored
Showing with 68 additions and 7 deletions.
  1. +10 −3 .aliases
  2. +42 −0 .bash_prompt
  3. +5 −4 .gitconfig
  4. +11 −0 .profile
View
13 .aliases
@@ -47,13 +47,13 @@ alias be='bundle exec'
alias tailf='tail -f ~/Sites/error_log'
-# taken from https://github.com/mathiasbynens/dotfiles
+# Taken from https://github.com/mathiasbynens/dotfiles
# Shortcuts
-alias d="cd ~/Documents/Dropbox"
+alias d="cd ~/Documents"
alias p="cd ~/Projects"
alias g="git"
-alias v="vim"
+alias v="mvim"
alias m="mate ."
# IP addresses
@@ -61,3 +61,10 @@ alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
alias localip="ipconfig getifaddr en1"
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
+# Flush Directory Service cache
+alias flush="dscacheutil -flushcache"
+
+# View HTTP traffic
+alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'"
+alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\""
+
View
42 .bash_prompt
@@ -0,0 +1,42 @@
+# @gf3’s Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt"
+# Shamelessly copied from https://github.com/gf3/dotfiles
+
+if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
+elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
+fi
+
+if tput setaf 1 &> /dev/null; then
+ tput sgr0
+ if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
+ MAGENTA=$(tput setaf 9)
+ ORANGE=$(tput setaf 172)
+ GREEN=$(tput setaf 190)
+ PURPLE=$(tput setaf 141)
+ WHITE=$(tput setaf 256)
+ else
+ MAGENTA=$(tput setaf 5)
+ ORANGE=$(tput setaf 4)
+ GREEN=$(tput setaf 2)
+ PURPLE=$(tput setaf 1)
+ WHITE=$(tput setaf 7)
+ fi
+ BOLD=$(tput bold)
+ RESET=$(tput sgr0)
+else
+ MAGENTA="\033[1;31m"
+ ORANGE="\033[1;33m"
+ GREEN="\033[1;32m"
+ PURPLE="\033[1;35m"
+ WHITE="\033[1;37m"
+ BOLD=""
+ RESET="\033[m"
+fi
+
+parse_git_dirty () {
+ [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
+}
+parse_git_branch () {
+ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
+}
+
+PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
View
9 .gitconfig
@@ -1,14 +1,15 @@
+[apply]
+ whitespace = fix
+
[core]
excludesfile = /Users/clint/.gitignore
editor = vim
- whitespace = trailing-space,space-before-tab
+ whitespace = fix,space-before-tab,tab-in-indent,trailing-space
autocrlf = input
-[apply]
- whitespace = fix
[color]
- ui = true ;doesnt work for some reason ...
+ ui = auto ;doesnt work for some reason ...
interactive = true
status = true
branch = true
View
11 .profile
@@ -1,4 +1,15 @@
source ~/.cinderella.profile
source ~/.git-completion.bash # from git source contrib/completion
source ~/.aliases
+source ~/.bash_prompt
export PATH=$PATH:/Users/clint/Developer/include:/Users/clint/Projects/scripts:/Users/clint/Developer/pear/bin:/Users/clint/Developer/Cellar/python
+
+
+# Make Tab autocomplete regardless of filename case
+set completion-ignore-case on
+
+# Append a slash when autocompleting symbolic links to directories
+set mark-symlinked-directories on
+
+# List all matches in case multiple possible completions are possible
+set show-all-if-ambiguous on
Please sign in to comment.
Something went wrong with that request. Please try again.