This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Execute open rspec buffer | |
" Thanks to Ian Smith-Heisters | |
function! RunSpec(args) | |
if exists("b:rails_root") && filereadable(b:rails_root . "/script/spec") | |
let spec = b:rails_root . "/script/spec" | |
else | |
let spec = "spec" | |
end | |
let cmd = ":! " . spec . " % -cfn " . a:args | |
execute cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# Git pre-commit hook: | |
# Install at .git/hooks/pre-commit and set as executable | |
# | |
# Interactively sets git commit author for pair programming | |
# | |
################################################### | |
# Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name login | |
// @namespace http://fluidapp.com | |
// @description This keeps you logged in to new relic across browser sessions | |
// @include * | |
// @author Sam Goldstein | |
// ==/UserScript== | |
(function () { | |
if (window.fluid) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your .bashrc or .profile | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
PS1='\w $(parse_git_branch) $ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! BDD(args) | |
if bufname("%") =~ "test.rb" | |
call RunTest(a:args) | |
elseif bufname("%") =~ ".scala" | |
call RunSBTTest() | |
elseif bufname("%") =~ "spec.rb" | |
call RunSpec(a:args) | |
else | |
echo "don't know how to BDD this file" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'spec' | |
describe "iterative matchers" do | |
def all_be &block | |
simple_matcher "all be" do |given, matcher| | |
matcher.failure_message = "expected #{given.inspect} to all be something" | |
matcher.negative_failure_message = "expected #{given.inspect} to not all be something" | |
given.all? &block | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httperf --hog --server 10.1.10.118 --port 8080 --num-conn 10000 --ra 100 --num-calls=100 --timeout .01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
scp ~/.ssh/id_rsa.pub $1:~ | |
ssh $1 "mkdir -p ~/.ssh && touch ~/.ssh/authorized_keys && chmod 700 ~/.ssh && chmod -R 600 ~/.ssh/* && cat ~/id_rsa.pub >> ~/.ssh/authorized_keys && rm ~/id_rsa.pub" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# | |
# *) local and remote branch names |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
df = diff | |
lg = log -p | |
l = log --graph --pretty=format:'%Cred%h%Creset - %Cblue%an%Creset - %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative | |
la = log --graph --pretty=format:'%Cred%h%Creset - %Cblue%an%Creset - %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --all | |
pr = pull --rebase |