Skip to content

Instantly share code, notes, and snippets.

View briansorahan's full-sized avatar
🎯
Focusing

Brian Sorahan briansorahan

🎯
Focusing
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@briansorahan
briansorahan / errgroup_demo.go
Last active August 2, 2021 17:07
Demo errgroup.WithContext - one failed goroutine cancels the context that other goroutines are select'ing from
package main
import (
"context"
"fmt"
"os"
"time"
"golang.org/x/sync/errgroup"
)
@briansorahan
briansorahan / main.go
Created July 14, 2020 18:51
Debugging parquet-go
package main
import (
"bufio"
"compress/gzip"
"io"
"log"
"os"
"time"
@briansorahan
briansorahan / bunttest.go
Last active August 23, 2019 16:38
Quick test for buntdb
package main
import (
"log"
"time"
"github.com/tidwall/buntdb"
gen "github.com/Pallinder/go-randomdata"
)
@briansorahan
briansorahan / badgertest.go
Last active August 21, 2019 15:14
Testing badgerdb
package main
import (
"log"
"time"
"github.com/dgraph-io/badger"
gen "github.com/Pallinder/go-randomdata"
)
brew info librdkafka
librdkafka: stable 1.0.0 (bottled), HEAD
The Apache Kafka C/C++ library
https://github.com/edenhill/librdkafka
/usr/local/Cellar/librdkafka/1.0.0 (16 files, 2.6MB) *
 Poured from bottle on 2019-04-04 at 11:15:56
@briansorahan
briansorahan / logs
Created February 1, 2019 19:38
rdkafka debug logging
%7|1549049645.355|MEMBERID|rdkafka#consumer-1| [thrd:app]: Group "reprocess": updating member id "(not-set)" -> ""
%7|1549049645.356|BRKREASSIGN|rdkafka#consumer-1| [thrd:main]: Group "reprocess" management reassigned from broker (none) to :0/internal
%7|1549049645.356|CGRPSTATE|rdkafka#consumer-1| [thrd:main]: Group "reprocess" changed state init -> wait-broker (v1, join-state init)
%7|1549049645.356|BRKASSIGN|rdkafka#consumer-1| [thrd:main]: Group "reprocess" management assigned to broker :0/internal
%7|1549049645.356|INIT|rdkafka#consumer-1| [thrd:app]: librdkafka v0.11.6 (0xb06ff) rdkafka#consumer-1 initialized (builtin.features 0xffff, debug 0x2504)
%7|1549049645.360|TOPIC|rdkafka#consumer-1| [thrd:app]: New local topic: diml.denormalized-dataset.errors
%7|1549049645.360|TOPPARNEW|rdkafka#consumer-1| [thrd:app]: NEW diml.denormalized-dataset.errors [-1] 0x4f074a0 (at rd_kafka_topic_new0:362)
%7|1549049645.667|STATE|rdkafka#consumer-1| [thrd:main]: Topic diml.denormalized-dataset.errors changed state unkn
@briansorahan
briansorahan / Dockerfile
Last active November 10, 2018 15:05
Smallest possible debian image with librdkafka Go bindings?
FROM golang:1.11.2-stretch
RUN apt-get update -qq -y
RUN apt-get install -qq -y build-essential ca-certificates file make gcc
ENV RDKAFKA_VERSION=0.11.6
ENV ZSTD_VERSION=1.3.5
# Install zstd from source (debian package is a bit old, doesn't have support for dictionary compression).
RUN cd /root && \
wget https://github.com/facebook/zstd/archive/v${ZSTD_VERSION}.tar.gz && \
@briansorahan
briansorahan / mktopic.go
Last active September 24, 2018 17:12
Testing github.com/segmentio/kafka-go CreateTopics method.
package main
import (
"fmt"
"io"
"log"
"os"
"github.com/pkg/errors"
sk "github.com/segmentio/kafka-go"
@briansorahan
briansorahan / BogaudioCrashDarwin.md
Created January 18, 2018 21:45
Crash Report for Bogaudio VCV Rack Module
Process:               Rack [3633]
Path:                  /Applications/Rack.app/Contents/MacOS/Rack
Identifier:            com.vcvrack.rack
Version:               ??? (???)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Rack [3633]
User ID:               2064188898