Skip to content

Instantly share code, notes, and snippets.

View lawrencejones's full-sized avatar

Lawrence Jones lawrencejones

View GitHub Profile
@lawrencejones
lawrencejones / README.md
Last active July 17, 2024 23:14
Example event processing code taken from incident-io

eventadapter

Shared in advance of a talk to Netflix's engineering team as part of their Architecture Discussion Forum, this is an excerpt of code from the incident-io Go monolith that is used to power our async workers.

It depends on internal libraries (such as our o11y and error packages) but is a good starting point for anyone who wanted to build something similar.

Usage

You define an event in a common event package such as:

@lawrencejones
lawrencejones / README.md
Created December 12, 2023 19:39
Produce build telemetry from a MacBook

MacBook system information

You can run this script in order to extract various runtime and system measurements from a MacBook that might be relevant to performance.

This is a sample output:

{
  "id": "3d0f3c61-480e-4ace-9a65-c6e09ffd2dbd",
 "timestamp": "2023-12-12T19:38:27.013103Z",
@lawrencejones
lawrencejones / README.md
Last active September 14, 2022 03:16
Slack modal to escalate to Splunk On-Call

Slack modal to escalate to Splunk On-Call

This is the code that implements a Slack modal for escalating to Splunk On-Call.

Thanks to some investment in our Slack tooling, we have a framework for building modals that makes them really easy to build, and trivially testable.

Just by adding these two files, these modals become useable. Simples!

Screenshot of the modal

@lawrencejones
lawrencejones / README.md
Last active November 10, 2021 18:18
Exemplar API responses from the workflow service

Workflow APIs

Exemplar API responses from the workflows service.

@lawrencejones
lawrencejones / README.md
Last active September 21, 2022 21:10
Terraform for provisioning a private container builder, see https://incident.io/blog/container-builder

Container builder

This gist is associated with the blog post "Deploying to production in <5m with our hosted container builder".

It contains the terraform code used to provision the builder instance. While it uses a private module instance_group, the code should be a useful starting point to figure out how to run this yourself.

Dropin (tokenless)

The Dropin is a Javascript modal that allows integrators to initialise Billing Request Flows all from within their own websites.

Include the GoCardless Dropin initialise script on each page of your site:

<script src="https://pay.gocardless.com/billing/static/dropin/v2/initialise.js"></script>
@lawrencejones
lawrencejones / client.go
Created February 21, 2021 14:34
Building a goa client
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 October 28, 2022 09:00
How we compress Pub/Sub messages and more, saving a load of money