Skip to content

Instantly share code, notes, and snippets.

@sqs
sqs / gist:ce913ce35599d3377c11
Created June 24, 2014 16:07
sourcegraph/go-vcs libgit2 cgo crash - in cgo-crash branch
$ go test -test.run=Concurrency
*** Error in `/tmp/go-build871593397/github.com/sourcegraph/go-vcs/vcs/_test/vcs.test': double free or corruption (top): 0x0000000001549d60 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x80996)[0x7faa96ef7996]
/usr/local/lib/libgit2.so.0(+0x77acc)[0x7faa974d3acc]
/usr/local/lib/libgit2.so.0(+0x77b24)[0x7faa974d3b24]
/usr/local/lib/libgit2.so.0(+0x77cdd)[0x7faa974d3cdd]
/usr/local/lib/libgit2.so.0(+0x9bea5)[0x7faa974f7ea5]
/usr/local/lib/libgit2.so.0(+0x6c1aa)[0x7faa974c81aa]
/usr/local/lib/libgit2.so.0(+0x6c381)[0x7faa974c8381]
@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 = {};
}