Skip to content

Instantly share code, notes, and snippets.

View customcommander's full-sized avatar
🇺🇦
I stand with Ukraine

Julien Gonzalez customcommander

🇺🇦
I stand with Ukraine
  • London, UK
View GitHub Profile
@customcommander
customcommander / transitions-observable.md
Created January 5, 2023 10:31
Observing state transitions with XState & RxJS

Observing state transitions with XState & RxJS

Objective

Create an observable that emits each time a specific transition is taken.

Problem

This "flip" machine keeps tossing the coin each time it lands on head. The machine reaches its final state when the side is tail:

@customcommander
customcommander / testdoublejs.md
Last active October 6, 2021 17:51
Testdouble.js Cheatsheet & Cookbook

Testdouble.js Cheatsheet & Cookbook

Why use testdouble.js?

Suppose we need to test that a function calls another function:

function call(fn) {
  fn();
}
@customcommander
customcommander / RIS-Specification.md
Last active August 25, 2021 18:06
A detailed look at the 2011 RIS Specification

RIS Specification

This is to the best of my knowledge the RIS specification as it was defined in 2011 by the original author. See https://en.wikipedia.org/wiki/RIS_(file_format)#cite_note-:1-5.

(Re)producing the dataset

Requirements

In order to run the scripts used to produce the dataset the following programs must be available on your system path:

@customcommander
customcommander / jsdoc-cheat-sheet.md
Last active March 12, 2025 12:10
JSDoc Cheat Sheet