Skip to content

Instantly share code, notes, and snippets.

@sr
sr / test.rb
Created February 24, 2009 03:00 — forked from brynary/gist:69372
module Rack
module Test
module Session
attr_reader :last_response
attr_reader :last_request
alias_method :response, :last_response
alias_method :request, :last_request
def initialize(app)
@sr
sr / todo
Created July 31, 2009 23:16 — forked from vangberg/todo
#!/bin/sh
# Best To-Do List. Ever.
#
# Usage:
# 1. Add a new item to list: `todo This needs to be fixed`
# 2. Edit the to-do list: `todo -e`
# 3. Show the current to-do's: `todo`
if [[ $1 ]]; then
if [ $1 = "-e" ]; then
@sr
sr / ci.rake
Created July 27, 2010 11:33 — forked from albertoperdomo/ci.rake
namespace :ci do
task :copy_yml do
sh "cp #{Rails.root}/config/example_database.yml #{Rails.root}/config/database.yml"
end
desc "Prepare for CI and run entire test suite"
task :build do
ENV["RACK_ENV"] = "test"
Rake::Task['db:migrate'].invoke
Rake::Task['db:test:prepare'].invoke
@sr
sr / gist:3277766
Created August 6, 2012 19:23 — forked from rzezeski/gist:3250870
detect bad merge index files
#!/usr/bin/env escript
%% -*- erlang -*-
-include_lib("kernel/include/file.hrl").
-compile(export_all).
-define(LOG(S), io:format(S)).
-define(LOG(S,A), io:format(S,A)).
main(Dirs) ->
CodePath = case os:getenv("RIAK_LIB") of