Public Gists by ReinH

Gravatar
Tue Oct 06 10:34:19 -0700 2009
1
2
3
0.25.0
======
b1eddbb Updated and created new CHANGELOG format
Gravatar
Mon Oct 05 11:20:48 -0700 2009
1
2
3
reinh:/Users/reinh$ time curl --HEAD http://www.gear6.com/
HTTP/1.1 200 OK
Date: Mon, 05 Oct 2009 18:19:36 GMT
Gravatar
Mon Oct 05 08:51:30 -0700 2009
1
2
3
describe Node do
  describe 'attributes' do
    before :each do
Gravatar
Fri Sep 25 14:46:39 -0700 2009
1
2
3
# Compute an average for <back> elements from the end of the results
def average_value(back, results)
  return results['values'].last['value'] if back.zero?
Gravatar
Fri Sep 25 14:46:22 -0700 2009
1
2
3
# Compute an average for <back> elements from the end of the results
def average_value(back, results)
  return results['values'].last['value'] if back.zero?
Gravatar
Wed Sep 09 16:24:40 -0700 2009
1
2
3
module Facter
  def self.add(name, &block)
    collection.add(name, &block) # eventually becomes Factor::Util::Resolvers.instance_eval(block)
Gravatar
Fri Sep 04 01:42:36 -0700 2009
1
2
3
def do_something
  action = case
    when self.play?: true ? 'play football' : 'do nothing'
Gravatar
Thu Aug 20 10:29:21 -0700 2009
1
2
3
>> require 'builder'
=> true
>> x = Builder::XmlMarkup.new(:target => $stdout, :indent => 1)
Gravatar
Tue Aug 18 17:03:16 -0700 2009
1
2
3
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * This is the Parser 2 API version of the LetMeGoogleThatForYou *
 * Ubiquity script compatible with Ubiquity 0.5+. *
Gravatar
Tue Apr 14 07:21:00 -0700 2009
1
2
3
module Rack
  #
  # A Rack middleware for automatically removing the format token at the end
Gravatar
Wed Apr 08 10:58:45 -0700 2009
1
2
3
events: wall_time
 
fl=/Users/jasonn/sources/services/service-leads/ruby_runtime
Gravatar
Wed Mar 11 14:29:20 -0700 2009
1
2
3
#!/bin/env ruby -wdK
# Given an array, print it as a bar graph
# Use FOR SPEED!!!
Gravatar
Wed Mar 11 13:43:28 -0700 2009
1
2
3
  def self.next_available_arv_id
    return self.get_next_patient_identifier(identifier_type = "Arv national id")
  end
Gravatar
Wed Mar 11 11:03:40 -0700 2009
1
2
3
#!/bin/env ruby -wdK
# Given an array, print it as a bar graph
# Use FOR SPEED!!!
Gravatar
Tue Mar 10 08:47:53 -0700 2009
1
2
3
module Enumerable
  def comprehend(&block)
    map(&block).compact
Gravatar
Mon Mar 09 13:41:50 -0700 2009
1
2
3
class Hash
  def to_query_string
    map { |k, v|
Gravatar
Fri Jan 23 13:57:25 -0800 2009
1
2
3
class Endeca::Document < SomeAwesomeName::Abstract
  def properties
    @properties ||= @raw['Properties'] || {}
Gravatar
Fri Jan 23 10:56:09 -0800 2009
1
2
3
# Thanks to Josh Susser
class Object
  alias_method :try, :send
Gravatar
Wed Jan 21 12:01:11 -0800 2009
1
2
3
module Readers
  # Maps key/value pairs from the data structure used to initialize a
  # Endeca object. Allows attribute renaming. Use a block to perform data
Gravatar
Wed Jan 21 11:21:45 -0800 2009
1
2
3
reinhenrichs(master):rubinius$ cd kernel
reinhenrichs(master):rubinius/kernel$ cd common
reinhenrichs(master):rubinius/kernel/common$ cd ..