Skip to content

Instantly share code, notes, and snippets.

View ryanuber's full-sized avatar

Ryan Uber ryanuber

View GitHub Profile
@ryanuber
ryanuber / gist:78695e0d37451e77194e
Created October 16, 2014 02:33
Terraform hang during plan
SIGABRT: abort
PC=0x1a5ebe
goroutine 16 [syscall, 1 minutes]:
syscall.Syscall6(0x7, 0x4e0d, 0x86ba0c, 0x0, 0xc208072240, 0x0, 0x0, 0x1, 0x0, 0xc208072240)
/usr/local/go/src/pkg/syscall/asm_darwin_amd64.s:44 +0x5 fp=0x86b970 sp=0x86b968
syscall.wait4(0x4e0d, 0x86ba0c, 0x0, 0xc208072240, 0x2c31b, 0x0, 0x0)
/usr/local/go/src/pkg/syscall/zsyscall_darwin_amd64.go:32 +0x7d fp=0x86b9d0 sp=0x86b970
syscall.Wait4(0x4e0d, 0x86ba54, 0x0, 0xc208072240, 0x2ace4, 0x0, 0x0)
/usr/local/go/src/pkg/syscall/syscall_bsd.go:129 +0x64 fp=0x86ba18 sp=0x86b9d0
package main
import (
"fmt"
"sort"
"time"
"github.com/armon/relay"
)
package main
import (
"github.com/armon/relay"
"log"
"time"
)
func main() {
conf := &relay.Config{Addr: "localhost"}
---- Started new build at 2014-11-20 22:17:27.513674707 +0000 UTC ----
aws-build1 output will be in this color.
==> aws-build1: Inspecting the source AMI...
==> aws-build1: Creating temporary keypair: packer 546e6878-d7d2-3a20-ca03-a8f1891eebe8
==> aws-build1: Creating temporary security group for this instance...
==> aws-build1: Authorizing SSH access on the temporary security group...
==> aws-build1: Launching a source AWS instance...
 aws-build1: Instance ID: i-bdf72f53
==> aws-build1: Waiting for instance (i-bdf72f53) to become ready...
@ryanuber
ryanuber / raft-boltdb
Last active August 29, 2015 14:14
Raft backend benchmarks
BenchmarkBoltStore_FirstIndex-5 1000000 1932 ns/op
BenchmarkBoltStore_LastIndex-5 1000000 1907 ns/op
BenchmarkBoltStore_GetLog-5 300000 5931 ns/op
BenchmarkBoltStore_StoreLog-5 5000 266819 ns/op
BenchmarkBoltStore_StoreLogs-5 5000 300801 ns/op
BenchmarkBoltStore_DeleteRange-5 5000 322467 ns/op
BenchmarkBoltStore_Set-5 10000 247162 ns/op
BenchmarkBoltStore_Get-5 1000000 2176 ns/op
BenchmarkBoltStore_SetUint64-5 10000 240333 ns/op
BenchmarkBoltStore_GetUint64-5 1000000 2209 ns/op
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"time"
)
{{with $syslog := key "service/firehose/syslog_endpoint"}}
{{if ne $syslog ""}}
log {{$syslog}} local0 warning
log-send-hostname
{{end}}
{{end}}
panic: runtime error: index out of range
goroutine 46 [running]:
runtime.panic(0x7e53c0, 0xa68a5c)
/Users/mitchellh/code/3rdparty/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/mitchellh/packer/post-processor/atlas.(*PostProcessor).PostProcess(0xc2080480c0, 0x7fbde02f5310, 0xc20824c160, 0x7fbde02f5358, 0xc20824c1c0, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/mitchellh/code/go/src/github.com/mitchellh/packer/post-processor/atlas/post-processor.go:183 +0xf41
github.com/mitchellh/packer/packer/rpc.(*PostProcessorServer).PostProcess(0xc20803dcc0, 0x0, 0xc208252100, 0x0, 0x0)
/Users/mitchellh/code/go/src/github.com/mitchellh/packer/packer/rpc/post_processor.go:83 +0x2b8
reflect.Value.call(0x78b960, 0x7c38e8, 0x0, 0x130, 0x8356f0, 0x4, 0xc2080047e0, 0x3, 0x3, 0x0, ...)
@ryanuber
ryanuber / packer.json
Created March 7, 2015 17:19
QEMU Headless
{
"builders":
[
{
"type": "qemu",
"iso_url": "http://releases.ubuntu.com/14.04.1/ubuntu-14.04.1-server-amd64.iso",
"iso_checksum": "ca2531b8cd79ea5b778ede3a524779b9",
"iso_checksum_type": "md5",
"output_directory": "out",
"shutdown_command": "sudo shutdown -P now",
@ryanuber
ryanuber / scanner.diff
Created December 25, 2015 06:03
Fast text scanner in Go
diff --git a/bench_test.go b/bench_test.go
new file mode 100644
index 0000000..1431cfb
--- /dev/null
+++ b/bench_test.go
@@ -0,0 +1,174 @@
+package license
+
+import (
+ "bytes"