Skip to content

Instantly share code, notes, and snippets.

Rhys Evans wheresrhys

Block or report user

Report or block wheresrhys

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
wheresrhys /
Last active Jan 18, 2019
Runbooks in repos

Runbooks in repos straw man proposal

open questions

  • discovery of repos that contain docs - how. pull or push model
  • default docs folder name & structure. Coexistence with other docs?
  • discourage linking to people & teams? (Too hard to bulk change?)
  • how to avoid having to list refs to each .md file
  • how to put properties related to a md file with the content e.g. failOverInfo = free text field => md file failOverType = enum => ... front matter in md file?
wheresrhys /
Created Oct 26, 2018
Dewey is end of life


Dewey is on its way out, to be replaced by It's new, and by implication, imperfect. Please use it and let us know what you think.

Why replace Dewey?

FT's technical estate and its relationship to other aspects of the business are a complex web. Dewey's data layer was inadequate to the task of modelling this, so a decision was made to try rebuilding on top of a graph database. A few months later, and with a number of key dependencies (e.g. AWS cost allocation) already migrated from Dewey to the new Biz-Ops (Business Operations) data layer, it's time to migrate the administration of the data to a UI that talks directly to the new data layer, rather than via the imperfect proxy of an event log coming from Dewey.

What's different about Biz-Ops?

As touched on above, the major difference is that the underlying data structure is a graph. This means for example that where previously Cost Centre was a direct property on systems, now finding which Cost Centre to bill a system

wheresrhys /
Last active Oct 15, 2018
Logging/metrics idea

Basic motivation

  • We want to observe our systems. Sometimes we may want a log with messages in it, other times just a metric is fine. BUT the times we want either of these can be arbitrary... don't want to have to make a release of an app just because we're in the middle of an incident and want more detailed logs of something.
  • Want to untangle next-metrics from express
  • BUT ideally want any new thing to be reasonably backwards compatible

Sketch proposal


  • collects both logs & metrics in a unified interface
wheresrhys / you might not need
Last active Jul 27, 2018
You might not need lodash
View you might not need

You might not need lodash


(arr, size) => [...Array(Math.ceil(arr.length/size))].map(() => arr.splice(0, size))


(arr) => arr.filter(it => !!it)


(arr, values) => arr.concat(...values)

wheresrhys /
Last active Feb 5, 2018
Service workers union

Service Workers Union, Financial Times branch

Report of the Extraordinary Working Group on Controlling the Means of Releasing to Production


  1. Introduction - Comrade Evans
  2. Universal test coverage - Comrade Florisca
  3. Cooperation, and freedom, among independent features - Comrade Legg
  4. Some workers are more equal than others - Comrade Phillips
  5. The purge of service worker traitors - Comrade Militaru
  6. Any other business
View reckie.js
Transform handlers compatible with express, lambda etc to each other
reckie.lambdaToExpress = handler => {
return (req, res) => {
const event = eventFromRequest(req);
const callback = callbackFromResponse(res);
handler(event, null, callback);
wheresrhys /
Last active Jun 27, 2017
json tabs to spaces
for file in $(find . -name '*.json');
node -e "fs.writeFileSync('$file', JSON.stringify(require('./$file'), null, 2) + '\n')"
wheresrhys / pipeline
Last active May 7, 2017
Experimental pipeline for preflight
View pipeline
// 1. want an object of promises kicked off by each task
// 2. each task declares its dependencies
// 3. if no dependencies it runs immediately
// 4. if dependencies, waits for them
// 5. unified pattern
const tasks = {};
// str, arr, (req, headers, deps) => headers
const taskRunner = {
register: ({name, dependencies, catchable, task}) => {
View using a for loop
(function(response) {
var output = [];
for (var i = 0; i < response.length; i++) {
if (response[i].type === 'PullRequestEvent') {
return output;
View geebee deprecation guide --> --> --> --> (but double check the output is as expected) --> -->
Remember to also search the codebase for uri encoded versions of the urls as these will need updating too.
We don't have a switch off date for next-geebee yet, but as it's a next project experiment, rather than a platform,
You can’t perform that action at this time.