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

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
wheresrhys / communique.md
Created Oct 26, 2018
Dewey is end of life
View communique.md

TLDR;

Dewey is on its way out, to be replaced by https://biz-ops.in.ft.com. 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
wheresrhys / ft-observable.md
Last active Oct 15, 2018
Logging/metrics idea
View ft-observable.md

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

ft-observable

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

You might not need lodash

_.chunk

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

_.compact

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

_.concat

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

@wheresrhys
wheresrhys / sw.md
Last active Feb 5, 2018
Service workers union
View sw.md

Service Workers Union, Financial Times branch

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

Contents:

  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
e.g.
reckie.lambdaToExpress = handler => {
return (req, res) => {
const event = eventFromRequest(req);
const callback = callbackFromResponse(res);
handler(event, null, callback);
@wheresrhys
wheresrhys / fix-json.sh
Last active Jun 27, 2017
json tabs to spaces
View fix-json.sh
for file in $(find . -name '*.json');
do
node -e "fs.writeFileSync('$file', JSON.stringify(require('./$file'), null, 2) + '\n')"
done
@wheresrhys
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') {
output.push(response[i])
}
}
return output;
})
View geebee deprecation guide
next-geebee.ft.com/assets --> www.ft.com/__assets/creatives
next-geebee.ft.com/hashed-assets --> www.ft.com/__assets/hashed
next-geebee.ft.com/n-ui --> www.ft.com/__assets/n-ui
next-geebee.ft.com/image/v1 --> www.ft.com/__origami/service/image/v2 (but double check the output is as expected)
next-geebee.ft.com/build --> www.ft.com/__origami/service/build
next-geebee.ft.com/polyfill --> www.ft.com/__origami/service/polyfill
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.