Skip to content

Instantly share code, notes, and snippets.

// src/fmt/foo.go
package fmt
import "internal/foo"
var _ = foo.Foo{}
@awly
awly / keybase.md
Last active February 3, 2017 03:29

Keybase proof

I hereby claim:

  • I am awly on github.
  • I am cronos (https://keybase.io/cronos) on keybase.
  • I have a public key whose fingerprint is C8B8 0141 C0F4 C08E D94D C509 6F2D A557 4AA2 D132

To claim this, I am signing this object:

package main
import (
"bufio"
"fmt"
"net"
)
type KVpair struct {
Key string
@awly
awly / code
Last active December 17, 2015 08:59
woah...
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
)
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"os"
)
@awly
awly / gist:5403749
Last active December 16, 2015 08:09
No more memory problems!
func assistGC(t uint64) {
for {
runtime.GC()
time.Sleep(t)
go assistGC(t + 1)
}
}
func main() {
runtime.GOMAXPROC(runtime.NumCpu())
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/cron/dev/go"
GOROOT="/usr/local/go"