Skip to content

Instantly share code, notes, and snippets.

Andrew Gerrand adg

View GitHub Profile
View gist:9cff49420906f4d825efc24e2f4e412d
$ go test ./...
ok 0.175s
[Decoder]: Using assembly version of decoder
2019/10/11 07:04:48 rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:9180: connect: connection refused"
FAIL 1.332s
ok 34.952s
? [no test files]
? [no test files]
ok 1.249s
? [no test files]
View gist:403300a7330d72ae366540b8dd3aad5f
~/src/ $ time go test -short ./...
ok 0.052s
ok 0.211s
ok 0.028s
ok 1.076s
ok 0.079s
ok 0.056s
? [no test files]
? [no test files]
ok 0.069s
adg /
Last active Jul 15, 2018
Update upspinservers to expose port 80
#!/bin/bash -e
# This script configures upspinservers deployed by upspin-ui to expose both
# port 80 and 443, to enable the Let's Encrypt http-01 challenge mechanism.
# See for more details.
if [[ "$#" != "1" || "$PROJECT" == "" ]]; then
echo >&2 "usage: $0 <google-cloud-project-id>"
exit 2
adg / decode.go
Created May 23, 2017
decode webcam
View decode.go
package main
import (
View gist:5fd928cacbc9c3e0249aa4ddc4d96aed
$ go test -short ./...
ok 0.088s
ok 0.724s
ok 0.025s
ok 2.011s
ok 0.162s
ok 0.055s
? [no test files]
? [no test files]
? [no test files]
adg /
Created Aug 27, 2015
hlint - a linter for HTML
tidy -utf8 -q -e $file 2>&1 | sed 's;line \([0-9][0-9]*\) column [0-9][0-9]* - ;'$file':\1: ;' | egrep -v 'missing <!DOCTYPE> declaration|inserting missing .title. element'
View ex_test.go
package ex_test
import "fmt"
func ExampleTestExample() {
fmt.Println(` flags.Bool("debug", false, "Turn on debugging.")`)
fmt.Println(` viper.BindPFlag("debug", flags.Lookup("debug"))`)
// Output:
// flags.Bool("debug", false, "Turn on debugging.")
// viper.BindPFlag("debug", flags.Lookup("debug"))

Go Lightning Talks

3:30pm, 1 Feb 2015, Go DevRoom, FOSDEM, Room K.3.401

Camlistore demo

Mathieu Lonjaret

Live demo of Camlistore easy deployment on gce. Quick overview of Camlistore's UI & tools.

adg / keep.txt
Created Jan 19, 2015
go-lite file list
View keep.txt
These files should be kept.
You can’t perform that action at this time.