Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Stockton cstockton

  • Phoenix, AZ, USA
View GitHub Profile
View license_error.md
$ 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
View community-based-example-gobgp-config.toml
####
# Machine GoBGP configuration: gobgp01
##
[global.config]
as = 26496
router-id = "10.20.30.21"
####
# 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++ {
View opentelemetry.md

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()
View slack-issue.md

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 (
"fmt"
"io"
"runtime"
"unicode/utf8"
"github.com/cstockton/er/internal/errutil"
"github.com/cstockton/er/internal/strutil"
View pyenv.sh
# 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)
View del_add_get_test.go
package deletetest
import (
"bytes"
"context"
"io"
"net"
"testing"
"time"
View delete_traffic_swings_test.go
package deletetest
import (
"context"
"encoding/json"
"io"
"net"
"testing"
"time"
You can’t perform that action at this time.