Skip to content

Instantly share code, notes, and snippets.

@moderation
moderation / acl.cue
Created Feb 19, 2020
CUE version of Tailscale acl.json
View acl.cue
// Declare static groups of users beyond those in the identity service
Groups: "group:eng": ["u1@example.com", "u2@example.com"]
// Declare convenient hostname aliases to use in place of IP addresses
Hosts: h222: "100.2.2.2"
// Access control list
ACLs: [{
Action: "accept"
// Match any of several users
Users: ["a@example.com", "b@example.com"]
View rustls_examples_tlsserver
cargo run --release --verbose --example tlsserver -- --certs ~/Library/letsencrypt/cert.pem --key ~/Library/letsencrypt/rsa_key.pem --verbose -p 10443 http
Fresh cfg-if v0.1.2
Fresh safemem v0.2.0
Fresh utf8-ranges v1.0.0
Fresh slab v0.3.0
Fresh libc v0.2.26
Fresh scopeguard v0.3.2
Fresh byteorder v1.1.0
Fresh log v0.3.8
Fresh time v0.1.38
View header_propagation_go.md

First create a map to propagate headers and then variables to hold the header names and the header values.

prop             map[string]string
headern          = []string{"l5dctxtrace", "xrequestidid", "xotspancontextontext", "xb3traceid", "xb3spanid", "xb3parentspanid", "xb3sampled", "xb3flags"}
headerv          = []string{"l5d-ctx-trace", "x-request-id", "x-ot-span-context", "x-b3-traceid", "x-b3-spanid", "x-b3-parentspanid", "x-b3-sampled", "x-b3-flags"}

In the function that receives the inbound HTTP request, capture the headers (passed by Envoy)

View anchore_file_diff_blitznote_baseimage
docker exec anchore_cli anchore query --image 61f17c009cfe show-file-diffs cd813b301d02
+--------------+--------------+------------------+--------------+---------------------------+------------------------+
| Image Id | Repo Tag | Compare Image Id | File | Input Image File Checksum | Compare Image Checksum |
+--------------+--------------+------------------+--------------+---------------------------+------------------------+
| 61f17c009cfe | blitznote/ba | cd813b301d02 | /usr/bin/fal | 6a5432a4750c | 1d888a9953bb |
| | seimage:late | | locate | dfe86693d2b4 | 6d49f734de2c |
| | st | | | 2f9cbbfc3eec | ac12c65a95ac |
| | | | | 13d36d4b8e27 | a72ea101a93c |
| | | | | c17705e4c39b | 555fad20f
View linkerd-dcos-060.yaml
admin:
port: 9990
routers:
- protocol: http
servers:
- port: 4140
ip: 0.0.0.0
interpreter:
kind: io.l5d.namerd
@moderation
moderation / tns-app.json
Created Jan 25, 2016
tns_marathon_weave
View tns-app.json
{
"id": "/tns/app",
"container": {
"type": "DOCKER",
"docker": {
"image": "peterbourgon/tns-app",
"network": "BRIDGE",
"parameters": [
{
"key": "hostname",
@moderation
moderation / mesos_arm.md
Last active Mar 21, 2016
Compile Apache Mesos 0.22 for Raspberry Pi 2
View mesos_arm.md

How to compile Mesos on your new Raspberry Pi 2 (which is amazing with 4 cores and 6x performance). Follows on from experiments in compiling for OS X

sudo apt-get install maven libsasl2-dev libapr1-dev libsvn-dev libcurl4-openssl-dev python-dev python-boto

export JAVA_HOME="/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt"
export PATH=$JAVA_HOME/bin:$PATH

http://likemagicappears.com/projects/raspberry-pi-cluster/mesos-on-raspbian/

@moderation
moderation / mesos_osx.md
Last active Feb 16, 2016
Compile Apache Mesos 0.21.0 on OS X
View mesos_osx.md

Apache 0.20.1 introduced some new build dependencies - mesos / docs / getting-started.md

# Install devel libapr1 (***Only required for Mesos 0.21.0 or newer***)
$ sudo apt-get install libapr1-dev

# Install devel libsvn (***Only required for Mesos 0.21.0 or newer***)
$ sudo apt-get install libsvn-dev
View gist:2827712f24cfce515697
Verifying that +moderation is my openname (Bitcoin username). https://onename.io/moderation
View keybase.md

Keybase proof

I hereby claim:

  • I am moderation on github.
  • I am moderation (https://keybase.io/moderation) on keybase.
  • I have a public key whose fingerprint is 4589 D175 C3A1 B5E2 90E0 7E31 6148 731F F2BF D610

To claim this, I am signing this object:

You can’t perform that action at this time.