Skip to content

Instantly share code, notes, and snippets.

@sqs
sqs / golang-present-speaker-notes.diff
Created June 13, 2014 13:10
Patch to add speaker notes to the Go present tool (lines beginning with ">"; in the web UI, toggle display with 'n'). Works on all slides but the title slide. Breaks if you have more than one contiguous run of lines starting with "> " in a single slide (due to CSS). I'll submit a real patch upstream soon (unless someone else volunteers).
diff -r 5b025577f8ab cmd/present/static/slides.js
--- a/cmd/present/static/slides.js Fri Jun 13 12:42:11 2014 +1000
+++ b/cmd/present/static/slides.js Fri Jun 13 06:09:06 2014 -0700
@@ -10,6 +10,8 @@
var curSlide;
+var showNotes;
+
/* ---------------------------------------------------------------------- */
@sqs
sqs / repro.sh
Last active August 29, 2015 14:01
Docker btrfs "no space left on device" when "processing triggers for libc-bin" in Ubuntu 14.04 host & container
# When running Docker (0.8-0.11.1) on an Ubuntu 14.04 or Amazon Linux host,
# using btrfs, the btrfs partition fills up when building a container with
# docker-in-docker.
#
# STEPS TO REPRODUCE:
# 1. Launch a new EC2 instance with Ubuntu 14.04, 64-bit, m3.large.
# 2. Log in with `ssh -i /path/to/key.pem ubuntu@ec2-hostname`.
# 3. Copy this script to the EC2 instance and run it.
# 4. Wait ~3 minutes, and you'll see the error at the bottom.
#
import collection.JavaConversions._
import java.net.URI
import java.net.ConnectException
import java.util.concurrent.TimeUnit
import com.couchbase.client.protocol.views.ViewRow
import com.couchbase.client.CouchbaseClient
import com.couchbase.client.protocol.views.Query
import java.util.concurrent.TimeUnit
import com.couchbase.client.protocol.views.ComplexKey
import com.couchbase.client.protocol.views.Stale
@sqs
sqs / gist:4151179
Created November 26, 2012 22:47
Sample Avro JS codegen'd file
if (typeof require !== "undefined" && typeof Avro === "undefined") {
var Avro = require("../lib/validator.js").Avro;
}
/**
* autograph.model.gen.PersonId (AUTOGENERATED)
*/
if (typeof autograph === "undefined") {
var autograph = {};
}