Skip to content

Instantly share code, notes, and snippets.

Yusuke Sato sat0yu

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
sat0yu / bloomfilter.go
Created Sep 23, 2019
A BloomFilter implementation
View bloomfilter.go
package main
import (
View active_record_with_connection_interceptor.rb
class ActiveRecordWithConnectionInterceptor < ::GRPC::ServerInterceptor
def request_response(**)
# ref:
::ActiveRecord::Base.connection_pool.with_connection do
alias_method :server_streamer, :request_response
alias_method :client_streamer, :request_response
You can’t perform that action at this time.