Skip to content

Instantly share code, notes, and snippets.

View philandstuff's full-sized avatar

Philip Potter philandstuff

View GitHub Profile
@philandstuff
philandstuff / serverless-london-2022-07.md
Created July 21, 2022 07:33
Serverless London July 2022 notes

Serverless London Meetup

2022-07-20

Sarah, Lego group, Kinesis

Real-time data processing using kinesis and lambda

Intro: I'm Sarah, (twitter: serverlesssarah), work at Lego group.

@philandstuff
philandstuff / README.md
Last active June 17, 2021 16:00
Validate emails against GOV.UK Notify's validation algorithm

GOV.UK Notify email validator

This is a script that takes a CSV file containing email addresses from a dirty data source, and splits it into two CSVs, one containing valid email addresses, and the other invalid.

How to use

First, clone the alphagov/notifications-utils repository. Add this script to the root, and make it executable:

chmod +x validate-emails.py
@philandstuff
philandstuff / README.md
Created September 16, 2020 15:42
Generate cloudformation from dhall

Example Dhall Cloudformation stuff

Call it like this:

dhall text <<< './sqs-broker-template.dhall "myQueueName" (toMap {tag1 = "foo", tag2 = "bar"}) False'

(change False to True for a FIFO queue)

@philandstuff
philandstuff / metrics.yaml
Created August 9, 2019 12:14
configure istio to collect custom metrics
---
apiVersion: config.istio.io/v1alpha2
kind: metric
metadata:
labels:
app: canary
owner: canary-hack
name: requestcountbypath
namespace: sandbox-main
spec:
@philandstuff
philandstuff / foo.go
Last active June 2, 2019 20:25
Demonstration of ugorji/go#300
package main
import (
"fmt"
"log"
"github.com/ugorji/go/codec"
)
func main() {
@philandstuff
philandstuff / clug-2019-01-31.org
Created January 31, 2019 22:09
london concourse user group jan 2019

Pipelines done right

  • Diego Lemos @dlresende, Derik Evangelista @kirederik
  • this talk is about pipelines and how you can use best practices to write better pipelines
  • who here works with concourse? [lots of hands]

introduction

CI / CD

@philandstuff
philandstuff / new-targets-config.yml
Last active September 24, 2018 16:10
Prototype for how we might do prometheus targets from the service broker in a better way
scrape_configs:
- job_name: 'paas'
scheme: https
static_configs:
- targets: ['guid:0','guid:1']
labels:
job: foo
space: my-space
@philandstuff
philandstuff / lead-dev-2018.org
Last active August 23, 2018 08:56
Lead Developer London 2018

Lead dev 2018

Welcome - Meri Williams

  • @TheLeadDev #LeadDevLondon
  • white coat captioning - @whitecoatcapxg
    • wvnts.co/lduk2018

The Container Operator’s Manual - Alice Goldfuss

  • happy pride! it’s like the world cup for people with fashion sense
  • who am I?
require 'octokit'
client = Octokit::Client.new(access_token: "<TOKEN>")
repos = client.repos('gds-attic')
repos.take(10).each do |repo|
puts "archiving #{repo.url}..."
client.post(
"#{repo.url}/transfer",
@philandstuff
philandstuff / scale-summit-18.org
Last active March 16, 2018 17:48
scale summit 2018

scalable build pipelines

A

  • jenkins as a build tool
  • microservices
  • how do we standdardize unit testing in our pipeline?
  • is a failure because we broke the pipeline, or because the code is bad?
  • we’ve recently been trying jenkins declarative pipelines
  • bash scripts