Skip to content

Instantly share code, notes, and snippets.

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
CONFIG_XEN=y
CONFIG_XEN_DOM0=y
CONFIG_XEN_PRIVILEGED_GUEST=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=500
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_PCI_XEN=y
CONFIG_XEN_PCIDEV_FRONTEND=m
CONFIG_XEN_BLKDEV_FRONTEND=y
#include "stdio.h"
void turrible(int a, int b) {
int* ptr = (&a);
while (*++ptr != a);
*ptr = b;
}
int main() {
int i = 125;
@hkolbeck
hkolbeck / json.go
Last active December 22, 2015 14:49 — forked from chrisdickinson/json.go
package main
/*ck imports are usually in one block, like`import (...)`, each import still on its own line */
import "math"
import "container/list"
import "strconv"
/*ck There are automated tools for adding/removing imports as you dev, v. worthwhile */
//import "fmt"
import "os"
import "encoding/json"