Skip to content

Instantly share code, notes, and snippets.

View dedeibel's full-sized avatar

Benjamin Peter dedeibel

View GitHub Profile
@dedeibel
dedeibel / chart.pl
Created October 27, 2009 13:31 — forked from jkramer/chart.pl
#!/usr/bin/perl
use strict;
use warnings;
use Chart::Pie;
use IO::File;
my $pie = Chart::Pie->new(640, 480);
my $score;
#!/usr/bin/perl
use strict;
use warnings;
use XML::LibXML;
if (@ARGV != 2) {
print "$0 <xml file> <schema file>\n";
exit 1;
@dedeibel
dedeibel / gist:1097200
Created July 21, 2011 13:37
getting a typed array from a typed set
Set<MyInterface> set = new HashSet<MyInterface>();
MyInterface list[] = {};
MyInterface[] array = set.toArray(list);
Beim Beenden der Anwendung bekomme ich nun immer solche setsamen Fehlermeldungen. Ist hier vielleicht das DESTROY (falsch / nicht) überschieben?
(in cleanup) ...Kraft::SFKlasseBasis::...::Kraft::SFKlasse0911::DESTROY nicht definiert! :'( at ./script/web_server.pl line 0
(in cleanup) ...Kraft::SFKlasseBasis::...::Kraft::SFKlasse::DESTROY nicht definiert! :'( at ./script/web_server.pl line 0
(in cleanup) ...Kraft::SFKlasseBasis::...::Kraft::SFKlasseBasis::DESTROY nicht definiert! :'( at ./script/web_server.pl line 0
@dedeibel
dedeibel / gist:2436783
Created April 21, 2012 12:00
AgileRM Open Space Coding Dojo
-- Zum durchgeführten Dojo
Gute Slideshare Präsentation zu Coding Dojo http://www.slideshare.net/vietnt84/coding-dojo-8752038
Youtube Video zum Ablauf des coding Dojo "How do you put on a coding dojo event? ": http://www.youtube.com/watch?v=gav9fLVkZQc
Kata: FizzBuzz: http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz
@dedeibel
dedeibel / gist:2920224
Created June 12, 2012 21:25
restore / sanitize sqlite databases
for i in *.sqlite ; do echo $i ; echo ".dump" | sqlite3 $i > $i.sql && rm $i && sqlite3 $i < $i.sql ; done
Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it ;) - Torvalds, Linus
@dedeibel
dedeibel / Native.java
Created July 18, 2013 18:28
Demonstrate working pool behavior for apache http
package getmultiple;
import java.io.IOException;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
$ cat tests/TestSequenceFunctions.py
import random
import unittest
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
self.seq = range(10)
def test_shuffle(self):
Martin Fowler hat es sehr weise Formuliert wie ich finde:
Feature Flags:
http://martinfowler.com/bliki/FeatureToggle.html
http://code.flickr.net/2009/12/02/flipping-out/
Feature Branch:
http://martinfowler.com/bliki/FeatureBranch.html