Skip to content

Instantly share code, notes, and snippets.

View jbreckmckye's full-sized avatar
💾

Jimmy Breck-McKye jbreckmckye

💾
View GitHub Profile
@jbreckmckye
jbreckmckye / match.js
Last active May 11, 2026 17:27
Wildcard matching string function
"use strict";
function matchWildcard(match, str) {
match = match.replace(/\*+/, '*');
let sn = 0;
let m, s;
for (let mn = 0; mn < match.length; mn++, sn++) {
m = match[mn];
s = str[sn];
if (m === '*') {
// Bail out at end of match
@jbreckmckye
jbreckmckye / comic.txt
Created December 19, 2025 16:05
Kafka schema registration and reconcilliation
,----------. ,-----------------.
| Producer |------------------------>| Schema Registry |
`----------' `-----------------'
Hi. Can I register a schema S1?
It looks like this {avsc}
,----------. ,-----------------.
| Producer |<------------------------| Schema Registry |
@jbreckmckye
jbreckmckye / binge.md
Last active April 22, 2026 11:49
Binge eating decision flowchart

Binge eating flowchart

flowchart TD

EE(Have you eaten enough today?)
EE -- no --> EH(Eat balanced meal. Wait 15 mins)
EE -- yes --> AT(Are you thirsty?)
AT -- yes --> Drink
AT -- no --&gt; T(Are you tired, underslept?)
@jbreckmckye
jbreckmckye / Cloudflare.md
Last active April 21, 2026 21:29
The CloudFlare outage was a good thing

The Cloudflare outage was a good thing

Cloudflare, the CDN provider, suffered a massive outage today. Some of the world's most popular apps and web services were left inaccessible for serveral hours whilst the Cloudflare team scrambled to fix a whole swathe of the internet.

And that might be a good thing.

The proximate cause of the outage was pretty mundane: a bad config file triggered a latent bug in one of Cloudflare's services. The file was too large (details still hazy) and this led to a cascading failure across Cloudflare operations. Probably there is some useful post-morteming about canary releases and staged rollouts.

@jbreckmckye
jbreckmckye / hl2_commands.md
Last active February 24, 2026 12:11
Useful HL2 commands for videos etc

Turn on cheats

  • sv_cheats 1

Noclip + noclip speed

  • noclip (on / off)
  • sv_noclipspeed 0.3 (default 5)

Remove HUD and viewmodel

  • cl_drawhud 0 (1 to re-enable)
  • r_drawviewmodel 0 (1 to re-enable)
@jbreckmckye
jbreckmckye / structure.md
Created January 9, 2026 13:22
A rough structure for technical design documents

My rough structure for tech design documents

There are as many ways to write an RFC, tech design, proposal doc, as there are ways to skin a cat. Here's the structure I'm currently using.

It looks a bit heavyweight, but it's possible to skip or collapse sections in less formal environments. But it's still useful as a framework for thinking through the proposal

Sections

@jbreckmckye
jbreckmckye / ff7_map_to_obj.cc
Created August 3, 2025 21:10
FFVII Map to Obj (I didn't write this! It was by Omzy - see https://forums.qhimm.com/index.php?topic=10717.0)
/*
ff7MapToObj
by Omzy (osamarah@gmail.com) 09/05/2010
[REL] thread at: http://forums.qhimm.com/index.php?topic=10717.0
See my WIP at the MDMD forums: http://z9.invisionfree.com/industrialpolygons/index.php?showtopic=562
Description: Converts a final fantasy 7 .map file to an .obj file that can be opened in various 3d rendering programs.
Requires: lzscdec.exe (by NFITC1) and .map files (wm0, wm2, wm3 from data/wm) must be in same directory.
Download lzscdec.exe from http://www.mediafire.com/?hwyyk2zjjjj
@jbreckmckye
jbreckmckye / memory.txt
Created September 16, 2024 21:09
crash 2 memory locations
LOCATION DESCRIPTION
0x60818 camera x, left to right increasing
@jbreckmckye
jbreckmckye / nano-frontends.md
Last active September 16, 2024 13:57
Nano-frontends

Nano-Frontends

Abstract

Micro-frontends are a strategy for splitting user interfaces up into separately deployable units. This gives teams great latitude to choose their own technologies and think in terms of self-contained programs. However, the "per page frontend" approach has disadvantages: pages cannot be shared by teams; sub-frontends are hard to modal-ise; and the user must download and execute duplicate JavaScript. Nano-frontends are an alternative that give teams similar freedoms but provide opt-in optimisations to improve user experience.

Give me the gist

Write your frontends as libraries that take a) a DOM element to render in and b) a set of common dependencies to call (e.g. React). Then allow a scaffold app to render the entire thing and inject the dependencies. Libraries can be published by writing artefacts to S3 and then monitoring for changes using SNS/SQS.

What does a 'dependency injected' frontend look like?

@jbreckmckye
jbreckmckye / analysing-css-compilation.md
Last active December 20, 2023 12:22
Analysing CSS compilation

^ see above