Skip to content

Instantly share code, notes, and snippets.

@damphyr
damphyr / environment
Created August 17, 2011 14:38
Get systemu to choke on the stdout of a program
d:\tmp\systemu>ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
d:\tmp\systemu>gem list
*** LOCAL GEMS ***
activemodel (3.0.9)
activerecord (3.0.9)
activesupport (3.0.9)
@damphyr
damphyr / environment
Created August 14, 2011 17:15
Minimal rakefile for Hoe 2.11.0 namespace bug
d:\foo>ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
d:\foo>gem list
*** LOCAL GEMS ***
activemodel (3.0.9)
activerecord (3.0.9)
activesupport (3.0.9)
@damphyr
damphyr / benchmark_couchrest.rb
Created August 9, 2011 11:13
require couchrest benchmark
require "rubygems"
require "benchmark"
puts Benchmark.measure{require "couchrest"}
puts Benchmark.measure{require "couchrest_model"}
@damphyr
damphyr / output
Created February 28, 2011 12:52
A simple test for dynamic dependencies in Rake
meisterbrau:rake-issues riva$ rake a
(in /Users/riva/Projects/mine/sandbox/rake-issues)
b
a
@damphyr
damphyr / canvas.erb
Created October 15, 2010 11:42
A simple extensible Sinatra application for use as an information radiator
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title><%= title %></title>
<script src="/js/drawing_methods.js"></script>
</head>
<body id="body" onload="<%= drawing_function %>">