Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Initial commit.

  • Loading branch information...
commit 8d2f0c1f2ccfa15d394555656fd576ab8964e0d5 0 parents
Dean Strelau authored
2  autotest
@@ -0,0 +1,2 @@
+require 'autotest/redgreen'
+require 'autotest/growl'
91 bash_aliases
@@ -0,0 +1,91 @@
+# MISC
+alias c='clear'
+alias ls='ls -AF'
+alias ll='ls -l'
+alias tree="ls -R | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
+
+# MySQL
+alias m='mysql -u root -p'
+sqlaunch() {
+ sudo launchctl ${1} -w /Library/LaunchDaemons/org.macports.mysql5.plist
+}
+
+# Apache
+alias reap='sudo apachectl restart'
+
+# Memcache
+alias mem='sudo /opt/local/etc/LaunchDaemons/org.macports.memcached/memcached.wrapper'
+
+# Thor
+alias t='thor'
+alias tgu='thor git:update'
+alias tgp='thor git:push'
+tg() {
+ thor git:$1
+}
+
+# Ruby
+alias irb='irb'
+alias rg='sudo gem'
+alias rgi='sudo gem install'
+gemview() {
+ mate $GEMDIR/gems/`$(which ls) $GEMDIR/gems | grep $1 | sort | tail -1`
+}
+gemdoc() {
+ open $GEMDIR/doc/`$(which ls) $GEMDIR/doc | grep $1 | sort | tail -1`/rdoc/index.html
+}
+_gemcomplete() {
+ COMPREPLY=($(compgen -W '$(`which ls` $GEMDIR/doc)' -- ${COMP_WORDS[COMP_CWORD]}))
+ return 0
+}
+complete -o default -o nospace -F _git gh
+complete -o default -o nospace -F _gemcomplete gemdoc
+complete -o default -o nospace -F _gemcomplete gemview
+
+# Rails
+alias dbm='rake db:migrate'
+alias dbmr='rake db:migrate:redo'
+alias dbtp='rake db:test:prepare'
+
+alias sc='./script/console'
+alias sdb='./script/dbconsole -p'
+alias sg='./script/generate'
+alias ss='./script/server'
+
+alias ttr='touch tmp/restart.txt'
+
+# SVN
+alias st='svn status --ignore-externals | grep -v ^X'
+alias sup='svn update --ignore-externals'
+alias sd='svn diff | mate'
+alias sds='svn diff | diffstat'
+
+# GIT
+alias g='git'
+alias gba='git branch -a'
+alias gc='git commit -v'
+alias gca='git commit -v -a'
+alias gt='git status'
+alias ga='git add'
+alias gd='git diff'
+alias gdc='git diff --cached'
+
+alias gx='gitx --all'
+
+branch_point() {
+ git rev-list --boundary $(__git_ps1 '%s')...master | grep ^- | cut -c2-
+}
+
+alias gsr='git svn rebase'
+alias gsd='git svn dcommit'
+gss() {
+ git show $(git svn find-rev r$1)
+ }
+
+# TEMP
+bp() {
+ ssh briarpatch-0${1}.vm.brightbox.net
+}
+by() {
+ ssh briaryear-0${1}.vm.brightbox.net
+}
7 bash_profile
@@ -0,0 +1,7 @@
+export PATH=/opt/local/bin:/opt/local/sbin:$PATH:$HOME/bin
+export MANPATH=/opt/local/man:$MANPATH
+export GEMDIR=`gem env gemdir`
+
+if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+fi
32 bashrc
@@ -0,0 +1,32 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+export HISTCONTROL=erasedups
+export HISTFILESIZE=10000
+shopt -s histappend
+
+export EDITOR=vim
+export VISUAL='mate -w'
+
+export PS1="\[\033[1;32m\][\W\$(__git_ps1 '\[\033[1;33m\] %s')\[\033[1;32m\]]\[\033[0m\] "
+
+export GREP_OPTIONS='--color=auto'
+export GREP_COLOR='4;31'
+
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+if [ -f $HOME/.git-completion.bash ]; then
+ . $HOME/.git-completion.bash
+fi
+
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi
+
+if [ -f ~/.j.sh ]; then
+ . ~/.j.sh
+fi
5 caprc
@@ -0,0 +1,5 @@
+begin
+ require 'capistrano_colors'
+rescue LoadError
+ # no colors for you
+end
10 gemrc
@@ -0,0 +1,10 @@
+---
+:update_sources: true
+:sources:
+- http://gems.rubyforge.org/
+- http://gems.github.com
+:bulk_threshold: 1000
+gem: --no-ri --no-rdoc
+:verbose: true
+:backtrace: false
+:benchmark: false
37 gitconfig
@@ -0,0 +1,37 @@
+[user]
+ name = Dean Strelau
+ email = dean@mintdigital.com
+[alias]
+ c = commit -v
+ co = checkout
+ ignored = "!git ls-files --others --exclude-standard"
+ pending = !git --no-pager log origin/master..master && echo
+[core]
+ excludesfile = /Users/dstrelau/.gitignore
+ whitespace = trailing-space
+[color]
+ branch = auto
+ diff = auto
+ status = auto
+[color "branch"]
+ current = yellow reverse
+ local = yellow
+ remote = green
+[color "diff"]
+ meta = yellow bold
+ frag = magenta bold
+ old = red bold
+ new = green bold
+[color "status"]
+ added = yellow
+ changed = green
+ untracked = cyan
+[svn]
+ rmdir = true
+[merge]
+ log = true
+ stat = true
+[mirror]
+ summary = true
+[branch]
+ autosetupmerge = true
1  gitignore
@@ -0,0 +1 @@
+.DS_Store
17 install.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/env ruby
+# from http://github.com/mislav/dotfiles/tree/master
+
+home = ENV['HOME']
+
+Dir.chdir File.dirname(__FILE__) do
+ dotfiles_dir = Dir.pwd.sub(home + '/', '')
+
+ Dir['*'].each do |file|
+ next if file == 'install.rb'
+ target_name = file == 'bin' ? file : ".#{file}"
+ target = File.join(home, target_name)
+ unless File.exist? target
+ system %[ln -vsf #{File.join(dotfiles_dir, file)} #{target}]
+ end
+ end
+end
9 irbrc
@@ -0,0 +1,9 @@
+IRB.conf[:AUTO_INDENT]=true
+
+require 'rubygems'
+require 'utility_belt'
+require 'pp'
+
+require 'wirble'
+Wirble.init
+Wirble.colorize
74 j.sh
@@ -0,0 +1,74 @@
+# http://github.com/rupa/j/raw/master/j.sh
+#
+# maintains a jump-list of directories you actually use
+# old directories eventually fall off the list
+# inspired by Joel Schaerer's http://wiki.github.com/joelthelion/autojump
+# and something similar i had - but i could never get the dir list right.
+#
+# INSTALL:
+# source into .bashrc under your '[-z "$PS1" ] || return' line
+# cd around for a while
+#
+# USE:
+# j [--l] [regex1 ... regexn]
+# regex1 ... regexn jump to the most used directory matching all masks
+# --l show the list instead of jumping
+# with no args, returns full list
+j() {
+ # change jfile if you already have a .j file for something else
+ jfile=$HOME/.j
+ if [ "$1" = "--add" ]; then
+ shift
+ # we're in $HOME all the time, let something else get all the good letters
+ [ "$*" = "$HOME" ] && return
+ awk -v q="$*" -F"|" '
+ $2 >= 1 {
+ if( $1 == q ) { l[$1] = $2 + 1; found = 1 } else l[$1] = $2
+ count += $2
+ }
+ END {
+ found || l[q] = 1
+ if( count > 1000 ) {
+ for( i in l ) print i "|" 0.9*l[i] # aging
+ } else for( i in l ) print i "|" l[i]
+ }
+ ' $jfile 2>/dev/null > $jfile.tmp
+ mv -f $jfile.tmp $jfile
+ elif [ "$1" = "" -o "$1" = "--l" ];then
+ shift
+ awk -v q="$*" -F"|" '
+ BEGIN { split(q,a," ") }
+ { for( i in a ) $1 !~ a[i] && $1 = ""; if( $1 ) print $2 "\t" $1 }
+ ' $jfile 2>/dev/null | sort -n
+ # for completion
+ elif [ "$1" = "--complete" ];then
+ awk -v q="$2" -F"|" '
+ BEGIN { split(substr(q,3),a," ") }
+ { for( i in a ) $1 !~ a[i] && $1 = ""; if( $1 ) print $1 }
+ ' $jfile 2>/dev/null
+ # if we hit enter on a completion just go there (ugh, this is ugly)
+ elif [[ "$*" =~ "/" ]]; then
+ x=$*
+ x=/${x#*/}
+ [ -d "$x" ] && cd "$x"
+ else
+ # prefer case sensitive
+ cd=$(awk -v q="$*" -F"|" '
+ BEGIN { split(q,a," ") }
+ { for( i in a ) $1 !~ a[i] && $1 = ""; if( $1 ) { print $2 "\t" $1; x = 1 } }
+ END {
+ if( x ) exit
+ close(FILENAME)
+ while( getline < FILENAME ) {
+ for( i in a ) tolower($1) !~ tolower(a[i]) && $1 = ""
+ if( $1 ) print $2 "\t" $1
+ }
+ }
+ ' $jfile 2>/dev/null | sort -nr | head -n 1 | cut -f 2)
+ [ "$cd" ] && cd "$cd"
+ fi
+}
+# bash completions for j
+complete -C 'j --complete "$COMP_LINE"' j
+# prepend to PROMPT_COMMAND
+PROMPT_COMMAND='j --add "$(pwd -P)";'"$PROMPT_COMMAND"
Please sign in to comment.
Something went wrong with that request. Please try again.