Skip to content

Instantly share code, notes, and snippets.


Christian Köstlin gizmomogwai

View GitHub Profile
gizmomogwai / clone_vmware_image.rb
Created May 3, 2013
Clone a stopped VMWare vm.
View clone_vmware_image.rb
from = ARGV[0]
to = ARGV[1]
puts "copy from #{from} to #{to}"
def run(cmd)
puts "Executing #{cmd}"
if !system(cmd)
raise "error while executing #{cmd}"
gizmomogwai / structs_vs_classes.d
Created Sep 26, 2011
calloverhead of methods of structs and classes
View structs_vs_classes.d
import std.datetime;
import std.stdio : writeln;
struct HStruct {
size_t c;
void add() {
c = c % 3 +1;
size_t get() {
gizmomogwai / gist:1014032
Created Jun 8, 2011
measurement of progresslistener
View gist:1014032
require 'benchmark'
class ProgressListener
def initialize
s = do |x|'ProgressListener.initialize') do
@todo = 0.0
@needed_tasks = {}
Rake::application.top_level_tasks.each do |name|
tasks = find_tasks_for_toplevel_task(name)
tasks.each do |t|
gizmomogwai / gist:987837
Created May 23, 2011
gs-core with os x
View gist:987837
gizmomogwai / parser.d
Created Dec 10, 2010
a shot at combinator parsing for d
View parser.d
module pc.parser;
import std.stdio;
import std.array;
import std.ctype;
import std.string;
import std.conv;
import std.regex;
import std.variant;
import std.functional;