Skip to content

Instantly share code, notes, and snippets.

@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 / tokenizer.rb
Created June 5, 2015 11:33
Diesel tokenizer
module Diesel
module Tokenize
attr_accessor :input
def tokenize source
tokens = Array.new
source.each do |line|
# Comment Type 1: Completely ignore all text between '##' and EOL
input = line.gsub(/##.*$/, "").strip
# Comment Type 2: Interpret all text between '%%' and EOL as docs
parts = input.split("%%")
@damphyr
damphyr / keybase.md
Created September 23, 2014 08:13
keybase.md

Keybase proof

I hereby claim:

  • I am damphyr on github.
  • I am arcandros (https://keybase.io/arcandros) on keybase.
  • I have a public key whose fingerprint is D1E4 FC0C 45A3 9A3D 3162 F7D1 99B7 A1A5 F690 9409

To claim this, I am signing this object:

INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_DETECTED_OS="MINGW32_NT-6.1"
INFO global: VAGRANT_EXECUTABLE="d:/tools/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="d:/tools/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
INFO global: VAGRANT_LOG="debug"