Skip to content

Instantly share code, notes, and snippets.

Grant Rodgers grantr

Block or report user

Report or block grantr

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 gist:6c9b72672c02faf6f0c6083a343a8ba4
kind: Broker
labels: <label map>
ingress: <Destination>
attributes: <TypeMeta>
kind: AttributesRule
View gist:86c77b6627e459edb4cdcc6337b45f4d
"level": "error",
"ts": "2020-01-03T14:42:08.615Z",
"logger": "activator",
"caller": "network/error_handler.go:31",
"msg": "error reverse proxying request; sockstat: sockets: used 2178\nTCP: inuse 1145 orphan 41 tw 494 alloc 3535 mem 2947\nUDP: inuse 0 mem 35\nUDPLITE: inuse 0\nRAW: inuse 0\nFRAG: inuse 0 memory 0\n",
"": "activator",
"": "activator-947bd7448-9mxxv",
"": "event-example/wathola-forwarder-d96jq",
"error": "read tcp> read: connection reset by peer",


Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group

grantr / main.go
Last active Apr 8, 2019
CEL int to float conversion bug
View main.go
package main
import (
structpb ""
grantr / reconciler.go
Last active Mar 25, 2019
A controller interface that can live peacefully in knative/pkg
View reconciler.go
// ObjectReconciler is what the user implements. This is the generic version.
// The controller MUST be aware of whether it's running with CR or CG.
// With this interface, at least the code will be structured similarly
// and the client interaction can converge over time (or not, as desired)
// This is called ObjectReconciler to avoid confusion with existing Reconciler
// interfaces.
type ObjectReconciler interface {
// This could alternately be called ReconcileObject.
Reconcile(context.Context, runtime.Object) error
grantr / eventing-and-sources.txt
Last active Feb 26, 2019
Percentage of code 2018Q4 - 2019Q1
View eventing-and-sources.txt
$ go run main.go --token_file=$HOME/.github.oauth --owner=knative --repos=eventing --repos=eventing-sources --users=grantr --start=08-31-2018 --end=02-25-2019
2019/02/26 10:57:46 Searching for PRs between 8-31-2018 and 2-25-2019
2019/02/26 10:58:38 Finished listing PRs. 725
2019/02/26 10:58:38 Finished filtering PRs for time. 464
2019/02/26 10:58:38 Finished filtering PRs for authors. 408
2019/02/26 11:10:32 Total PRs: 408. Commented PRs: 162
2019/02/26 11:37:07 Total lines added: 124303
2019/02/26 11:37:07 Total non-authored lines added: 117903
grantr / elasticsearch_query_parser.rb
Created Feb 19, 2015
Elasticsearch query parser experiments
View elasticsearch_query_parser.rb
module Elastomer
module Query
class ElasticsearchQueryParser < LuceneQueryParser
rule(:unbounded_range) { gte | lte | gt | lt }
#TODO range groups e.g. age:(>=10 AND < 20) age:(+>=10 +<20)
#TODO eliminate duplication
rule(:field) { >> str(':') >> (((group | regexp | | >> boost.maybe) | ((phrase | term) >> (distance | boost).maybe)) }
pkill -f 'elasticsearch.*'
rm -rf data/8823
bin/elasticsearch -Des.node.master=true 2>&1 >/dev/null &
sleep 1
bin/elasticsearch -Des.node.master=false 2>&1 >/dev/null &
sleep 1
grantr /
Last active Apr 13, 2016

Keybase proof

I hereby claim:

  • I am grantr on github.
  • I am grantr ( on keybase.
  • I have a public key ASAJ-N6ihtij2BAlmB2DPy4dvJGOh2A4xz7MDMjXzL5DZwo

To claim this, I am signing this object:

grantr / curvecp_handshake.rb
Last active Jul 19, 2018
CurveCP handshake protocol in Ruby
View curvecp_handshake.rb
# A demonstration of the CurveCP handshake protocol. This protocol has many
# favorable security properties described at
# In addition to its security advantages, it has the following favorable properties:
# * Needs only 2 messages (1 from client, 1 from server) before application
# messages can be exchanged (3 before the server can send application messages)
# * Does not require the server to keep protocol state between handshake messages.
# An overview of the protocol:
You can’t perform that action at this time.