Skip to content

Instantly share code, notes, and snippets.

View adg's full-sized avatar

Andrew Gerrand adg

View GitHub Profile
~/go1.4/src $ ./make.bash
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
$ go test ./...
ok github.com/dgraph-io/dgraph/algo 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 github.com/dgraph-io/dgraph/chunker 1.332s
ok github.com/dgraph-io/dgraph/codec 34.952s
? github.com/dgraph-io/dgraph/codec/benchmark [no test files]
? github.com/dgraph-io/dgraph/compose [no test files]
ok github.com/dgraph-io/dgraph/conn 1.249s
? github.com/dgraph-io/dgraph/contrib/embargo [no test files]
~/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 July 15, 2018 22:50
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 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 04:01
decode webcam
package main
import (
"fmt"
"image/jpeg"
"io"
"log"
"mime/multipart"
"os/exec"
$ 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 August 27, 2015 03:46
hlint - a linter for HTML
#!/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'
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 https://twitter.com/lejatorn

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

@adg
adg / keep.txt
Created January 19, 2015 22:04
go-lite file list
These files should be kept.
go/AUTHORS
go/CONTRIBUTORS
go/LICENSE
go/PATENTS
go/README
go/VERSION
go/bin/go
go/include/README