Skip to content

Instantly share code, notes, and snippets.

@jaceklaskowski
jaceklaskowski / Rough Notes about CQRS and ES.md
Last active June 13, 2024 02:32
Rough Notes about CQRS and ES

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.

@trentmwillis
trentmwillis / snowflakes
Created December 13, 2014 00:01
A simple script to make falling snow on any page
(function() {
var snowflakes = [],
moveAngle = 0,
animationInterval;
/**
* Generates a random number between the min and max (inclusive).
* @method getRandomNumber
* @param {Number} min
* @param {Number} max
@sepans
sepans / README.md
Last active August 3, 2023 20:18
Implementation of Random Projection Locality Sensitive Hashing

Port of this python code in Javascript.

LSH from Wikipedia:

Locality-sensitive hashing (LSH) reduces the dimensionality of high-dimensional data. LSH hashes input items so that similar items map to the same “buckets” with high probability (the number of buckets being much smaller than the universe of possible input items). LSH differs from conventional and cryptographic hash functions because it aims to maximize the probability of a “collision” for similar items. Locality-sensitive hashing has much in common with data clustering and nearest neighbor search.

More explanation:

@morewry
morewry / monorepo-tool-comparison.md
Last active May 11, 2022 08:54
Comparison of Monorepo Tools For Web Client / Front End Projects (That Probably Use HTML, CSS, and JS)

Mono Repository Tool Comparison

For Web Client / Front End Projects

(That Probably Use HTML, CSS, and JS)

I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.

⚠️ Northbrook's author says the project is pretty dead and now uses Lerna.

Qualifications Wanted

@VitorLuizC
VitorLuizC / 0. useIdentify.ts
Created May 26, 2021 23:22
React.js useIdentify hook that generates an unique id with really random generated numbers for each name provided.
import { useCallback, useMemo } from 'react';
import generateHash from './generateHash.js';
export type Identify = (name: string) => string;
function useIdentify(): Identify {
const ids = useMemo(() => new Map<string, string>(), []);
return useCallback((name) => {
if (!ids.has(name)) {