Skip to content

Instantly share code, notes, and snippets.

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"
@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:

@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 / 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 / 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 / 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 / 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 / cloc_history.rb
Created August 18, 2011 10:59
Plot the LOC history for a bunch of svn revisions
#manually add the revisions or grep them out of svn log
revisions=[]
require 'psych'
require 'yaml'
require 'rubygems'
require 'fileutils'
require 'patir/command'
require 'json'
@damphyr
damphyr / gist:1405100
Created November 29, 2011 15:03
rutema minimal example output
[20111129 17:02:21] INFO: rutema v1.2.4
[20111129 17:02:21] INFO: Configuration loaded from config/minimal.rutema
[20111129 17:02:21] INFO: Run started in mode 'unattended'
[20111129 17:02:21] INFO: Running T001 - T001
[20111129 17:02:21] INFO: Scenario for T001
[20111129 17:02:21] INFO: Running step 1 - echo - echo
Hello Testing World
[20111129 17:02:21] INFO: 1 - echo - echo - success
[20111129 17:02:21] INFO: Running T002 - T002
[20111129 17:02:21] INFO: Scenario for T002
@damphyr
damphyr / jruby 1.6.7
Created May 16, 2012 14:57
Thread behaviour in Ruby (In the GIL's grip)
meisterbrau:sandbox riva$ ruby -v
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_31) [darwin-x86_64-java]
meisterbrau:sandbox riva$ ruby threading.rb
No threads: 0.955 seconds
Single thread: 0.667 seconds
Two threads: 0.683 seconds