Skip to content

Instantly share code, notes, and snippets.

Vassilis Rizopoulos damphyr

Block or report user

Report or block damphyr

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
damphyr / tokenizer.rb
Created Jun 5, 2015
Diesel tokenizer
View tokenizer.rb
module Diesel
module Tokenize
attr_accessor :input
def tokenize source
tokens =
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("%%")

Keybase proof

I hereby claim:

  • I am damphyr on github.
  • I am 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:

View vagrant halt debug log
INFO global: Vagrant version: 1.6.3
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
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_LOG="debug"
View Robot.ino
// Controlling a servo position using a potentiometer (variable resistor)
// by Michal Rinott <>
int potpin = 0; // analog pin used to connect the potentiometer
int mode=1;
void setup()
damphyr / pdfkit_0.5.3_windows_bug.rb
Created Jul 4, 2013
Reproduces the pdfkit 0.5.3 behaviour with paths that contain spaces on Windows. Tested with RubyInstaller Ruby 1.9.3p392
View pdfkit_0.5.3_windows_bug.rb
require 'pdfkit'
def reproduce html,output,path_to_wk
PDFKit.configure do |config|
config.wkhtmltopdf = path_to_wk
damphyr / Vagrantfile
Last active Dec 18, 2015
Refactored multiple Vagrant provider configuration (alternative to
View Vagrantfile
# Vagrantfile for testing
def configure_provider provider,config,cfg_lmbd
config.vm.provider provider do |prvdr,override|,override)
def vbox_config name,ip,memory_size=384
damphyr / backtrace
Created Oct 8, 2012
Reproduce the windows marshalling bug in systemu
View backtrace
c:/ruby/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:89:in `rescue in block (3 levels) in s
ystemu': systemu: Error - process interrupted! (RuntimeError)
o:↕ArgumentError: mesg"∟dump format error(0x67):bt[I"kC:/Users/C11865/AppData/Local/Temp/syste
1/program:5:in `<main>'♠@
from c:/ruby/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:82:in `block (3 levels) i
n systemu'
from c:/ruby/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:76:in `popen'
from c:/ruby/lib/ruby/gems/1.9.1/gems/systemu-2.5.2/lib/systemu.rb:76:in `block (2 levels) i
n systemu'
damphyr / jruby 1.6.7
Created May 16, 2012
Thread behaviour in Ruby (In the GIL's grip)
View jruby 1.6.7
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
damphyr / gist:1405100
Created Nov 29, 2011
rutema minimal example output
View gist:1405100
[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 / cloc_history.rb
Created Aug 18, 2011
Plot the LOC history for a bunch of svn revisions
View cloc_history.rb
#manually add the revisions or grep them out of svn log
require 'psych'
require 'yaml'
require 'rubygems'
require 'fileutils'
require 'patir/command'
require 'json'
You can’t perform that action at this time.