Skip to content

Instantly share code, notes, and snippets.

View benwyrosdick's full-sized avatar

Ben Wyrosdick benwyrosdick

View GitHub Profile
@benwyrosdick
benwyrosdick / grep_edit
Created July 14, 2009 14:44
grep_edit script
#!/bin/sh
#grep_edit some_pattern [some_path]
#
#the path is optional ... for help with git grep command type:
#git help grep
git grep $1 $2 | cut -f1 -d: | uniq | xargs mvim
[color]
diff = auto
status = auto
branch = auto
[user]
name = Ben Wyrosdick
email = [email protected]
[alias]
st = status
co = checkout
if exists('g:loaded_pathogen')
call pathogen#runtime_prepend_subdirectories(expand('~/.vim/bundles'))
end
syntax on
filetype plugin indent on
augroup vimrc
autocmd GuiEnter * set guioptions-=T columns=150 lines=70
augroup END
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/'
}
function count_git_changes {
git ls-files -m -o -d --exclude-standard 2> /dev/null | grep \w* -c | sed -e 's/\([0-9]*\)/ \1/g' -e '/^ 0/d'
}
function proml {
local BLUE="\[\033[0;34m\]"
class Sudoku
attr_accessor :board
Possibilities = (1..9).to_a
def initialize(board_in = nil)
self.board = []
9.times do # rows
row = []