Skip to content

Instantly share code, notes, and snippets.

View philandstuff's full-sized avatar

Philip Potter philandstuff

View GitHub Profile
@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
@philandstuff
philandstuff / devopsdays.org
Last active October 12, 2017 21:05
Devopsdays london 2017

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 / clojurex-2014.org
Last active June 30, 2017 21:39
Clojure eXchange 2014

Korny Sietsma, Pragmatic Performance Testing

quotes

  • “we don’t care about perf”
  • “clojure should be fast”
  • “we’re using mongo!”
  • “clojure might not be fast enough, we should use type hints”

JMeter

csv,conf,v2

Ben Foxall, Serving CSV from the browser

  • @benjaminbenben @pusher

why do I love CSV?

  • accessibility - don’t need specialized programs
  • it’s the start of something, not the end
@philandstuff
philandstuff / consistency.org
Created March 2, 2017 16:39
consuming-consistency-proofs

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 February 7, 2017 18:16
build regexes for matching all vowels
#!/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 = []
========================================================================== 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 October 5, 2016 14:09
Example external representations

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