Skip to content

Instantly share code, notes, and snippets.

Antoine Grondin aybabtme

Block or report user

Report or block aybabtme

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 test.go
package main
func main() {
println("lol")
}
View monotone.go
package monotoneulid
import (
"errors"
"io"
"github.com/oklog/ulid"
)
// Generator generates ULIDs that are strictly monotonically increasing, even
View fakesync.go
package p2p
import (
"bytes"
"fmt"
"os"
"os/signal"
"runtime"
"sync"
"sync/atomic"
View pzalgo.go
package main
import (
"bytes"
"flag"
"github.com/Shopify/go-lua"
"github.com/kortschak/zalgo"
"io"
"log"
"os"
View keybase.md

Keybase proof

I hereby claim:

  • I am aybabtme on github.
  • I am antoineg (https://keybase.io/antoineg) on keybase.
  • I have a public key whose fingerprint is 6F35 158F 2F17 763B 44F1 4396 C6DD 7E23 7AEA 9856

To claim this, I am signing this object:

View conc_err_map.go
//go:generate pipeliner map(func(string) (string, error) concurrently as concErrMap into conc_err_map.go
func concErrMap(concurrency int, fn func(string) (string, error), in <-chan string) (<-chan string, <-chan error) {
out := make(chan string)
errc := make(chan error, concurrency)
done := make(chan struct{})
go func() {
defer close(out)
defer close(errc)
wg := sync.WaitGroup{}
wg.Add(concurrency)
@aybabtme
aybabtme / gist:6bf2edacedabc7445c38
Created Feb 4, 2015
Most useful GoSublime snippet.
View gist:6bf2edacedabc7445c38
"snippets": [
{
"text": "sortby",
"title": "type bySomeOrder []type",
"value": "type $1 []$2\n\nfunc(b $1) Len() int { return len(b) }\nfunc(b $1) Swap(i, j int) { b[i],b[j] = b[j],b[i] }\nfunc(b $1) Less(i, j int) bool { return b[i].$3 < b[j].$3 }"
},
],
View sentry_hook.go
// LogHook builds a func that can be fired by a doge/log through
// log.AddHook. If the entry it fires on contains an error, it will
// include a stacktrace of the logger's callsite.
//
// import "doge/log"
//
// log.AddHook(
// sentry.LogHook("my.pkg/name"),
// log.Lerror, log.Lpanic, log.Lfatal,
@aybabtme
aybabtme / syslog_formatter.go
Created Dec 26, 2014
syslog formatter middleware for Logrus
View syslog_formatter.go
package log
import (
"fmt"
"log/syslog"
"os"
"github.com/Sirupsen/logrus"
)
You can’t perform that action at this time.