Skip to content

Instantly share code, notes, and snippets.

pete higgins phiggins

Block or report user

Report or block phiggins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bin_packing.rb
require "minitest/autorun"
require "benchmark/ips"
class CachingPack
def, order)
return if inventory.nil? || inventory.empty?
return if inventory.inject(:+) < order
loop do
r = cached_pack(inventory, order)
View dci_benchmark.rb
require 'rubygems'
require 'benchmark/ips'
class ExampleClass
def foo; 42; end
non_dci_object =
module ExampleMixin
View gist:512596
class Inspect
def self.profile
require 'ruby-prof'
result = yield
prof_result = RubyProf.stop
printer =
You can’t perform that action at this time.