Skip to content

Instantly share code, notes, and snippets.

@hkolbeck
hkolbeck / AppTest.java
Created January 30, 2014 23:47
TDD, YO
package com.urbanairship;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
The Challenge
-------------
Given the following riddle, write a regular expression describing all possible answers,
assuming you never make a move which simply undoes the last one you made.
The Riddle
----------
You are on your way somewhere, taking with you your cabbage, goat, and wolf, as always.
You come upon a river and are compelled to cross it, but you can only carry one of the
three companions at a time. None of them can swim because this isn't THAT kind of riddle.
@hkolbeck
hkolbeck / collector.go
Created February 11, 2014 01:07
Collector
package main
import (
"flag"
"fmt"
"log"
"net/http"
"io"
"io/ioutil"
"encoding/json"
package nfa
import "fmt"
type nfa struct {
Q []chan string
q0, F int
monitor chan int
input chan string
package nfa
import "fmt"
type nfa struct {
Q []chan string
q0, F int
monitor chan int
input chan string
package fsa
type FSA interface {
Accept(s string) bool
}
#include <stdio.h>
int main(int argc, char** argv) {
printf("argc = %d\n", argc);
}
@hkolbeck
hkolbeck / server.go
Created December 27, 2010 07:42 — forked from reiddraper/server.go
package main
import (
"http"
"net"
"io"
"log"
"os"
"bufio"
)
require 'rubygems'
require 'isaac'
configure do |c|
c.nick = 'ExplainerBot'
c.server = 'dev.urbanairship.com'
c.port = 6697
c.ssl = true
end
@hkolbeck
hkolbeck / memcached-release-history
Created February 15, 2013 18:04
Memcached Version History
1.4.7
Use a monotonically increasing timer
Immediately expire items when given a negative expiration time
fix memcached-tool to print about all slabs
Properly daemonize memcached for debian
Don't permanently close UDP listeners on error
Allow memcached-init to start multiple instances (not recommended)
Issue 214 : Search for network libraries before searching for libevent
Issue 213 : Search for clock_gettime in librt
Issue 115 : accont for CAS in item_size_ok