Skip to content

Instantly share code, notes, and snippets.

Avatar

Lawrence Jones lawrencejones

View GitHub Profile
@lawrencejones
lawrencejones / client.go
Created Feb 21, 2021
Building a goa client
View client.go
package api
import (
"net/url"
goahttp "goa.design/goa/v3/http"
health "github.com/lawrencejones/pgsink/api/gen/health"
healthhttp "github.com/lawrencejones/pgsink/api/gen/http/health/client"
imports "github.com/lawrencejones/pgsink/api/gen/imports"
@lawrencejones
lawrencejones / compress-everything.md
Last active Dec 31, 2020
How we compress Pub/Sub messages and more, saving a load of money
View compress-everything.md
@lawrencejones
lawrencejones / connected-data.md
Last active Dec 31, 2020
Connected data: Using BigQuery to analyse user behaviour in response to webhooks
View connected-data.md
@lawrencejones
lawrencejones / consoles.go
Created Oct 5, 2020
Theatre consoles wrapper
View consoles.go
package cmd
import (
"bytes"
"context"
"encoding/json"
"fmt"
"os"
"strings"
"text/template"
@lawrencejones
lawrencejones / Makefile
Last active Feb 3, 2021
Why you need a service registry
View Makefile
make-it-rain.json: make-it-rain.jsonnet
jsonnet -J $(ANU_ROOT)/utopia/lib -J $(ANU_ROOT)/utopia/jvendor $^ > $@
View argocd-rbac.jsonnet
local registry = import 'registry/index.jsonnet';
// Compute the rbac rules that should be configured in ArgoCD, using the service
// registry to determine who should be given what permissions.
//
// This module can be evaluated concretely, which may help to debug the rbac
// list for ArgoCD.
{
_config:: {
// Operator grants- anyone with admin or operator should be permitted to
View app.jsonnet
local app = import 'app.libsonnet';
app {
_config+:: {
release: 'release-bot',
namespace: 'connect-team',
environment: 'production',
app: 'release-bot',
image: 'eu.gcr.io/gc-containers/gocardless/release-bot',
tag: 'TODO',
@lawrencejones
lawrencejones / _hidden.libsonnet
Created Jun 1, 2020
Theatre auto-generated CRDs
View _hidden.libsonnet
{
local hidden = (import '_hidden.libsonnet'),
rbac:: {
v1alpha1:: {
local apiVersion = { apiVersion: 'rbac/v1alpha1' },
// Computer generated, description unknown
directoryRoleBinding:: {
new():: {},
withMetadata(metadata):: self + { metadata: metadata },
withMetadataMixin(metadata):: self + { metadata+: metadata },
@lawrencejones
lawrencejones / README.md
Created Mar 25, 2020
Find indices that require forcemerging
View README.md

Force-merge analysis

Find indicies that still require force-merging