Skip to content

Instantly share code, notes, and snippets.

View hamishforbes's full-sized avatar

Hamish Forbes hamishforbes

  • Christchurch, NZ
View GitHub Profile
local k = import 'k.libsonnet';
local container = k.core.v1.container;
local containerPort = k.core.v1.containerPort;
local deployment = k.apps.v1.deployment;
local service = k.core.v1.service;
local configMap = k.core.v1.configMap;
/*
* Create an envoy load balancer for distributors
hamish@Hamish-MBP ~/b/k8s> kubectl -n test get pod tailscale-test1 -ojson | jq .spec.containers[0].securityContext
{
"capabilities": {
"add": [
"NET_ADMIN"
]
}
}
hamish@Hamish-MBP ~/b/k8s> kubectl -n test get pod tailscale-test2 -ojson | jq .spec.containers[0].securityContext
FROM alpine:3.11 AS build
ARG CHANNEL=unstable
ARG VERSION=0.99.1-127
ARG ARCH=amd64
RUN mkdir /build
WORKDIR /build
RUN apk add --no-cache curl tar
@hamishforbes
hamishforbes / cache_tags.txt
Created November 28, 2018 09:36
Ledge Cache Tags notes
Cache Tags
TODO
housekeeping gracefulness
housekeeping tests
case tests
multi tag tests
settings {
logfile = "/var/log/lsyncd/lsyncd.log",
maxProcesses = 20,
pidfile = "/var/run/lsyncd.pid",
statusFile = "/tmp/lsyncd.status",
--nodaemon = true
}
local function clamScan(event, path)
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_rlimit_nofile 16384;
events {
worker_connections 8192;
}
### Keybase proof
I hereby claim:
* I am hamishforbes on github.
* I am hamishforbes (https://keybase.io/hamishforbes) on keybase.
* I have a public key whose fingerprint is CB03 E31D CC5D 9CDE 22A6 FDB6 D66A B2EC 845F 803D
To claim this, I am signing this object:
@hamishforbes
hamishforbes / nginx.conf
Last active November 7, 2016 16:15
FFI zlib decompress with body_filter
error_log logs/error.log debug;
events {
worker_connections 1024;
}
http {
default_type text/html;
lua_package_path "/Users/hamish/lua-ffi-zlib/lib/?.lua;;";
hamish@Hamish-MBP ~/e/e/t/cert> curl -vs --cacert rootCA.pem https://localhost:443/
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate: localhost
> GET / HTTP/1.1
> Host: localhost
> User-Agent: curl/7.43.0
> Accept: */*
>

Why should everyone write documentation?

If you're asking this question, you're probably french, or lazy, or new, or something else :).

It saves time for the rest of us

The initial time hit for writing a page of documentation is minimal compared to the time it saves others. A quick paragraph or two explaining why something is the way it is will allow someone else to quickly obtain information. If we need to know where a customer's systems are located or how to access the network statistics, then we don't want to spend a few hours trying to figure it out. That's time better spent doing something fun or productive instead of duplicating what the last poor schmuck went through.

There is (unfortunately) a ?school of thought that believes if you want to know something, you should duplicate the long solitary learning process. This is how information is lost. This is why there are fifty ways to do something that are shared among a dozen people with sole knowledge of them. This is the path of fail.