Skip to content

Instantly share code, notes, and snippets.

View lawrencejones's full-sized avatar

Lawrence Jones lawrencejones

View GitHub Profile
lawrencejones /
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 / Makefile
Last active April 24, 2023 13:04
Why you need a service registry
make-it-rain.json: make-it-rain.jsonnet
jsonnet -J $(ANU_ROOT)/utopia/lib -J $(ANU_ROOT)/utopia/jvendor $^ > $@
lawrencejones / argocd-rbac.jsonnet
Created September 10, 2020 17:01
ArgoCD configuration
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
lawrencejones / refresh.applescript
Created February 9, 2014 22:21
Applescript to refresh Google Chrome
tell application "Chrome" to tell the active tab of its first window
end tell
lawrencejones / all_activities.rb
Last active March 7, 2023 20:29
Abusing the Strava API to achieve basic functionality
require 'oauth'
require 'uri'
require 'sinatra/base'
require 'pry'
require 'unirest'
require 'strava/api/v3'
module Strava
class Authorizer < Sinatra::Base
TOKEN_FILE = File.join(ENV['HOME'], '.strava_token')
lawrencejones /
Last active October 28, 2022 09:00
How we compress Pub/Sub messages and more, saving a load of money
lawrencejones /
Last active September 21, 2022 21:10
Terraform for provisioning a private container builder, see

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.

lawrencejones /
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 /
Last active November 10, 2021 18:18
Exemplar API responses from the workflow service

Workflow APIs

Exemplar API responses from the workflows service.