Skip to content

Instantly share code, notes, and snippets.

Avatar

Philip Potter philandstuff

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

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 Jun 17, 2021
Validate emails against GOV.UK Notify's validation algorithm
View README.md

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 Sep 16, 2020
Generate cloudformation from dhall
View README.md

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 Aug 9, 2019
configure istio to collect custom metrics
View metrics.yaml
---
apiVersion: config.istio.io/v1alpha2
kind: metric
metadata:
labels:
app: canary
owner: canary-hack
name: requestcountbypath
namespace: sandbox-main
spec:
View foo.go
package main
import (
"fmt"
"log"
"github.com/ugorji/go/codec"
)
func main() {
@philandstuff
philandstuff / clug-2019-01-31.org
Created Jan 31, 2019
london concourse user group jan 2019
View clug-2019-01-31.org

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 Sep 24, 2018
Prototype for how we might do prometheus targets from the service broker in a better way
View new-targets-config.yml
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 Aug 23, 2018
Lead Developer London 2018
View lead-dev-2018.org

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?
View transfer.rb
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",
View scale-summit-18.org

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