Public Gists by joshsusser

Gravatar
Sat Oct 24 13:05:59 -0700 2009
1
2
3
# full project and documentation for Refraction is available at
# http://github.com/pivotal/refraction
 
Gravatar
Mon Oct 05 14:17:12 -0700 2009
1
2
3
[jruby:1.4.0RC1] potrero:tracker pivotal$ jruby -S gem uninstall twitter
Successfully uninstalled twitter-0.6.14
[jruby:1.4.0RC1] potrero:tracker pivotal$ jruby -S geminstaller
Gravatar
Sat Sep 26 13:23:01 -0700 2009
1
2
3
# put at top of test_helper.rb
 
require 'yaml'
Gravatar
Sat Aug 01 15:26:45 -0700 2009
1
2
3
<h1>Listing topics</h1>
 
<table>
Gravatar
Thu Jul 23 17:21:49 -0700 2009
1
2
3
  ### meta magic boolean attributes
  def self.attr_boolean(attr_name)
    class_eval(<<-CODE, __FILE__, __LINE__)
Gravatar
Fri Jun 05 00:37:54 -0700 2009
1
2
3
# an object representing a duck type that can be used in a case expression
class Protocol
  def initialize(*selectors)
Gravatar
Wed May 13 22:17:43 -0700 2009
1
2
3
# require_here.rb
# by Josh Susser
 
Gravatar
Tue May 05 13:07:56 -0700 2009
1
2
3
# drop this in config/initializers/count_fix.rb to work around
# hmt/named_scope count bug https://rails.lighthouseapp.com/projects/8994/tickets/2189
 
Gravatar
Thu Mar 26 11:00:40 -0700 2009
1
2
3
export PS1="\[\033[36m\]\h:\W>\[\033[0m\] "
 
export PS1="\[\033[36m\]\h:\w \[\033[33m\]\$(parse_git_branch)\$(parse_svn_branch)\[\033[00m\]$\[\033[00m\] "
Gravatar
Wed Feb 11 10:24:36 -0800 2009
1
2
3
class ApplicationController < ActionController::Base
  around_filter :you_are_here
 
Gravatar
Fri Jan 16 16:55:20 -0800 2009
1
2
3
# at the very least, use inheritance!
 
class Object
Gravatar
Sun Jan 11 00:25:20 -0800 2009
1
2
3
Host project1.github.com
  HostName github.com
  User git # Probably not needed but just a note if you want to skip it
Gravatar
Thu Jan 01 22:06:49 -0800 2009
1
2
3
require 'benchmark'
 
class Validated
Gravatar
Wed Oct 15 07:54:01 -0700 2008
1
2
options.scan(/\w+=\w+/).inject({}) { |h,opt| k,v = opt.split('=',2); h[k] = v; h }
 
Gravatar
Sun Aug 17 10:36:52 -0700 2008
1
2
3
require 'benchmark'
include Benchmark