Skip to content

Instantly share code, notes, and snippets.

View cstockton's full-sized avatar

Chris Stockton cstockton

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)))'
0x45be08
####
# Machine GoBGP configuration: gobgp01
##
[global.config]
as = 26496
router-id = "10.20.30.21"
####
# Environment GoBGP configuration: docker
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

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": [
package er
import (
"fmt"
"io"
"runtime"
"unicode/utf8"
"github.com/cstockton/er/internal/errutil"
"github.com/cstockton/er/internal/strutil"
@cstockton
cstockton / pyenv.sh
Created July 25, 2018 14:49
pyenv setup
# Lang - Python (pyenv)
#
# $ git clone -C /ws/lang https://github.com/pyenv/pyenv
# $ # 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)
package deletetest
import (
"bytes"
"context"
"io"
"net"
"testing"
"time"
package deletetest
import (
"context"
"encoding/json"
"io"
"net"
"testing"
"time"