Skip to content

Instantly share code, notes, and snippets.

@kevinprince
kevinprince / gist:2758848
Created May 20, 2012 17:26
webform for bcb site
<form action="http://barcamplondon.createsend.com/t/r/s/wdilkt/" method="post" id="subForm">
<div>
<label for="name">Name:</label><br /><input type="text" name="cm-name" id="name" /><br />
<label for="wdilkt-wdilkt">Email:</label><br /><input type="text" name="cm-wdilkt-wdilkt" id="wdilkt-wdilkt" /><br />
<input type="hidden" name="cm-f-akiuik" id="anything" value="TRUE" />
<input type="hidden" name="cm-f-akiudl" id="barcamp" value="TRUE" />
<input type="submit" value="Subscribe" />
</div>
</form>
@kevinprince
kevinprince / gist:2283130
Created April 2, 2012 12:30
example flashing light / speaker on switch
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(12, OUTPUT);
pinMode(9, OUTPUT);
}
void loop() {
int sensorOneValue = digitalRead(2);
@kevinprince
kevinprince / gist:1872460
Created February 21, 2012 00:07
nginx proxy pass with auth loop
#may not be exactly correct syntax but you get the idea
location / {
#bleh usual nginx conf
valid_token = subrequest_to_something('token')
if valid_token{
#do proxy pass
} else {
@kevinprince
kevinprince / gist:1864448
Created February 19, 2012 16:06
geek trip copy

##Overview:

When: Wednesday May 2nd 2012 - Monday May 7th 2012 (May Day Bank Holiday Weekend) Where: The Armoury, Delft, The Netherlands Who: You + 30 other geeks from all over Europe!

##The Plan:

Last year we escaped London during the marriage of the Duke and Duchess of Cambridge to Delft in the The Netherlands and had an amazing time.

@kevinprince
kevinprince / gist:1212725
Created September 12, 2011 23:04
badges in ruby
require "prawn"
require "prawn/measurement_extensions"
Prawn::Document.generate("hello.pdf",
:page_size => "A5",
:page_layout => :landscape,
:margin => 0.mm
) do
bounding_box [0.mm, 148.mm], :width => 105.mm, :height => 148.mm do
bounding_box [5.mm, 105.mm], :width => 105.mm, :height => 220.mm do