Skip to content

Instantly share code, notes, and snippets.

View jszwedko's full-sized avatar

Jesse Szwedko jszwedko

View GitHub Profile
@jszwedko
jszwedko / Golang.pm
Created March 5, 2014 19:10
Perl module for use with SQL::Translator to generate Go structs from SQL DDL
#!/usr/bin/env perl
package Custom::Golang;
use strict;
use SQL::Translator;
use String::CamelCase qw(camelize);
use Data::Dumper;
my %dbi_type_map = (
integer => "int",
@jszwedko
jszwedko / multiprogrammed_batch_processing_system.go
Created February 25, 2013 00:26
Playing around with the ideas from Hoare's "A model for communicating sequential processes" (specifically section 10). Doesn't gracefully quit or do the print spooling thing. Run like: `go run multiprogrammed_batch_processing_system.go -readers 3 -printers 3 -processors 2 -job "3:3" -job "2" -job "1:1:1" -job "4:4:4:4:4:4" -job "5:5"`. See -h fo…
package main
import (
"flag"
"fmt"
"math/rand"
"strings"
"time"
)