Skip to content

Instantly share code, notes, and snippets.

Andrew Gerrand adg

Block or report user

Report or block adg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:403300a7330d72ae366540b8dd3aad5f
~/src/upspin.io $ time go test -short ./...
ok upspin.io/access 0.052s
ok upspin.io/bind 0.211s
ok upspin.io/cache 0.028s
ok upspin.io/client 1.076s
ok upspin.io/client/clientutil 0.079s
ok upspin.io/client/file 0.056s
? upspin.io/cloud/https [no test files]
? upspin.io/cloud/mail [no test files]
ok upspin.io/cloud/mail/sendgrid 0.069s
@adg
adg / upspinserver-update.sh
Last active Jul 15, 2018
Update upspinservers to expose port 80
View upspinserver-update.sh
#!/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 https://github.com/upspin/upspin/issues/568 for more details.
PROJECT="$1"
if [[ "$#" != "1" || "$PROJECT" == "" ]]; then
echo >&2 "usage: $0 <google-cloud-project-id>"
exit 2
@adg
adg / decode.go
Created May 23, 2017
decode webcam
View decode.go
package main
import (
"fmt"
"image/jpeg"
"io"
"log"
"mime/multipart"
"os/exec"
View gist:5fd928cacbc9c3e0249aa4ddc4d96aed
$ go test -short ./...
ok upspin.io/access 0.088s
ok upspin.io/bind 0.724s
ok upspin.io/cache 0.025s
ok upspin.io/client 2.011s
ok upspin.io/client/clientutil 0.162s
ok upspin.io/client/file 0.055s
? upspin.io/cloud/https [no test files]
? upspin.io/cloud/log [no test files]
? upspin.io/cloud/mail [no test files]
@adg
adg / hlint.sh
Created Aug 27, 2015
hlint - a linter for HTML
View hlint.sh
#!/bin/sh
file=${1:-$GOROOT/doc/go_spec.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"))
View fosdem2015-go-lightning-talks.md

Go Lightning Talks

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

Camlistore demo

Mathieu Lonjaret https://twitter.com/lejatorn

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

@adg
adg / keep.txt
Created Jan 19, 2015
go-lite file list
View keep.txt
These files should be kept.
go/AUTHORS
go/CONTRIBUTORS
go/LICENSE
go/PATENTS
go/README
go/VERSION
go/bin/go
go/include/README
You can’t perform that action at this time.