Skip to content

Instantly share code, notes, and snippets.

Eat, sleep and breathe code

Yusuke Sato sat0yu

Eat, sleep and breathe code
Block or report user

Report or block sat0yu

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
sat0yu / interceptor.go
Created Jul 7, 2019
View interceptor.go
// ErrorCapturer specifies the implementation of a method to capture the given error
type ErrorCapturer interface {
CaptureError(err error, tags map[string]string) string
// SentryRavenInterceptor creates an interceptor which catches the errors from each service method and reports them to Sentry
func SentryRavenInterceptor(ec ErrorCapturer) grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, _info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
resp, err := handler(ctx, req)
if err != nil {
sat0yu / minhash.go
Created Sep 15, 2019
A MinHash implementation in go
View minhash.go
package main
import (
const DIM = 26 // |{'a', ..., 'z'}| = 26
You can’t perform that action at this time.