Skip to content

Instantly share code, notes, and snippets.


Chris Stockton cstockton

  • Phoenix, AZ, USA
View GitHub Profile
$ grep -r 'Error generating capa'
Binary file dmvd matches
$ _bin=$(which dmvd)
$ readelf -S $_bin | grep rodata
  [15] .rodata           PROGBITS         0000000000457a40  00057a40
$ readelf -p15 $_bin | grep -i 'Error generating'
  [  43c8]  Error generating capability request.
$ python -c 'print(hex(int("0000000000457a40", 16) + int("43c8", 16)))'
View community-based-example-gobgp-config.toml
# Machine GoBGP configuration: gobgp01
as = 26496
router-id = ""
# Environment GoBGP configuration: docker
View ipnet.go
package ipnet
var (
// these allow zero-allocation IP masking
cidrMasksIPv4 = [33]net.IPMask{}
cidrMasksIPv6 = [129]net.IPMask{}
func init() {
for i := 0; i <= 32; i++ {

TLDR, I want to propose / have a conversation around two things:

  1. Create a protocol / wire / some form of structural definition for distributed tracing. I urge the project owners to please reconsider having the libraries be the specification. I should not have to import an SDK to participate in distributed tracing, I should only need to be a cooperative client able to produce the data in the format agreed upon.
  2. The protocol / specification is designed to be 100% stateless. For lack of better words "eventual causality", I should know which set of spans are open and there should not be a consequence to a span which never was closed. Leave it to visualization and tooling to iron through the edge cases. Tracing is about observation across systems, a failed transaction, seg fault, crashing program, etc should not lose all the data that led up to that event as it does in the implementations I've used today (due to buffering log records and hanging onto unfinished spans in memory).

Where could I find more i

View logger.go
type contextKey struct{}
// FromContext returns the current zap logger from the given context, or
// the default global logger (by calling zap.L()) otherwise.
func FromContext(ctx context.Context) *zap.Logger {
if v, ok := ctx.Value(contextKey{}).(*zap.Logger); ok {
return v
return zap.L()

Given a block with a static_select as declared below:

  "type": "section",
  "text": { ... },
  "accessory": {
    "type": "static_select",
    "placeholder": { "type": "plain_text", "text": "Group1 - Foo" },
    "option_groups": [
View format.go
package er
import (
# Lang - Python (pyenv)
# $ git clone -C /ws/lang
# $ # uncomment deb-src sources for python /etc/apt/sources.list
# $ apt-get update && apt-get build-dep python{2.7,3,3.7}
# $ pyenv install 2.7.15
# $ pyenv install 3.7.0
# $ pyenv versions
# > * system (set by /ws/lang/pyenv/version)
View del_add_get_test.go
package deletetest
import (
View delete_traffic_swings_test.go
package deletetest
import (
You can’t perform that action at this time.