Skip to content

Instantly share code, notes, and snippets.

Philip Potter philandstuff

  • Government Digital Service
Block or report user

Report or block philandstuff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
@philandstuff
philandstuff / devopsdays.org
Last active Oct 12, 2017
Devopsdays london 2017
View devopsdays.org

Devopsdays London 2017

initial session, bob walker (@rjw1)

  • welcome everyone!
  • we have a code of conduct
  • thanks to organisers, sponsors, etc

Humane Teams at home and around the world

@philandstuff
philandstuff / consistency.org
Created Mar 2, 2017
consuming-consistency-proofs
View consistency.org

trying to implement consistency checking on my prison RSF poller

I wrote a thing to keep the prison index service prototype up-to-date. It works by polling the RSF for updates, and only downloads new entries.

However, the prison register is in discovery and I’m told it will be deleted and reloaded (possibly a number of times). This means that if I only download entries from the last entry number I saw, I’ll miss the entries which have been completely rewritten.

@philandstuff
philandstuff / vowel-regex.py
Created Feb 7, 2017
build regexes for matching all vowels
View vowel-regex.py
#!/usr/bin/env python3
def regex_for(required_letters):
# special cases for 1 and 2 letters, to keep things a bit tidier
if len(required_letters) == 1:
return required_letters[0]
if len(required_letters) == 2:
x,y = required_letters
return "%s.*%s|%s.*%s" % (x,y,y,x)
subregexes = []
View gist:5973d7449838c4076930bfe75c27888e
========================================================================== FAILURES ===========================================================================
______________________________________________________ test_audit_proofs_are_valid_with_alternative_impl ______________________________________________________
@given(st.lists(st.binary(), max_size=99), st.integers(min_value=0, max_value=99))
> def test_audit_proofs_are_valid_with_alternative_impl(data, leafIndex):
tests/test_verifiable_log.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/nix/store/s5f9zba6xbrjqxmmnjikwndqg9wk2xvr-python3.5-hypothesis-3.5.2/lib/python3.5/site-packages/hypothesis/core.py:524: in wrapped_test
print_example=True, is_final=True
@philandstuff
philandstuff / README.md
Last active Oct 5, 2016
Example external representations
View README.md

possible ideas for serialisation formats

This gist has some possible formats:

jsonl with inline items

This is the format from the first spike.

jsonl with items encoded as strings

You can’t perform that action at this time.