Skip to content

Instantly share code, notes, and snippets.

View davidglezz's full-sized avatar
😃
Happy

David Gonzalez davidglezz

😃
Happy
View GitHub Profile
@corporatepiyush
corporatepiyush / db_compare.md
Last active August 4, 2026 21:21
Database Comparison — SQLite · DuckDB · PostgreSQL · MariaDB · ClickHouse · MongoDB

Database Comparison — SQLite · DuckDB · PostgreSQL · MariaDB · ClickHouse · MongoDB

Version claims cross-checked against official release channels on 2026-07-15. Feature statements describe the versions listed in the table below. Where a database lacks a capability, or has it only in part, the closest practical alternative is given as Alternative:.

Database Stable Version Released Support Storage / Execution Model
SQLite 3.53.3 Jun 26, 2026 Format/API support pledged through 2050 Row-oriented B-trees, in-process, single file

These are some notes on the performance work that went into alien-signals. I'm sharing them not as a definitive guide, but as a log of a few key discoveries. The hope is that some of these findings might be useful to others tackling similar problems in high-performance JavaScript.

The Origin: Push-Pull-Push

My journey into the depths of reactivity performance began with Vue. I was trying to solve a specific problem in Vue 3.4: even if a computed's value didn't change, it would still trigger downstream computations and effects. This seemed inefficient. My attempt to fix this resulted in a pull request (vuejs/core#5912) that, after a year of discussions, was eventually merged. This PR introduced the Push-Pull-Push model to Vue 3.4, a model also adopted by libraries like reactivity.

For a time, I thought this was near-perfect. Then I saw the plans for Vue 3.5, which adopted a doubly-linked list but also moved to a pure pull-based model. I was still convinced

@Kobzol
Kobzol / fetch-prs.py
Created December 20, 2025 17:36
Python script for fetching number of opened and reviewed PRs by a GitHub user in a given year (the script has been mostly AI generated)
# /// script
# dependencies = ["github3api"]
# ///
import dataclasses
import json
import os
import sys
from collections import defaultdict
from datetime import datetime
from typing import Literal
@mmazzarolo
mmazzarolo / transform-barrel-file-imports.ts
Created November 10, 2024 19:37
Codemod to kill barrel file references
/**
* This script/codemod transforms imports from barrel files into direct imports.
* It's designed to work with jscodeshift to modify TypeScript/JavaScript files.
*
* Features:
* - Handles multiple barrel files
* - Transforms both value and type imports
* - Maintains correct relative paths
* - Handles re-exports within barrel files
*
@jeremystretch
jeremystretch / github_notifications_fix.md
Created June 12, 2024 14:11
Mark GitHub notifications as read

I've needed to do this several times to combat "ghost" notifications. These occur when a discussion is created and then deleted (e.g. for spam) before the notofication is read. You may see something like "1-0 of 4" at the bottom of the notifications page.

You can use the GitHub API client to show these notifications:

gh api notifications

To mark all notifications as read, send the API request below with curl. (Update the last_read date as needed.)

@conartist6
conartist6 / index.js
Created May 11, 2024 15:23
StreamIterable
export const getStreamIterator = (obj) => {
return obj[Symbol.for('@@streamIterator')]?.() || obj[Symbol.iterator]?.();
};
export class SyncGenerator {
constructor(embeddedGenerator) {
if (!embeddedGenerator.next) throw new Error();
this.generator = embeddedGenerator;
@OrionReed
OrionReed / dom3d.js
Last active August 17, 2026 20:05
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@gquittet
gquittet / 0-url-json-compress-client-node.js
Last active January 7, 2026 23:37
JSON compression for URL
import zlib from 'node:zlib';
import example from './example.json' assert { type: "json" };
const text = JSON.stringify(example);
const compressed = zlib.gzipSync(text).toString('base64').replace(/\//g, '_').replace(/\+/g, '-').replace(/=/g, '');
// H4sIAAAAAAAAE-3KsQ2AIBCG0V3-GhPu1ObmsJJQkGBhb2fcXRZggy955Suv7q7Y9qTenkshz74u2YfDLMyHU1_i8Xg8Ho_H4_F4PB6Px-PxeDwejzd99Qd5g3u1cRcAAA
@palashmon
palashmon / Prettify.ts
Created May 13, 2023 16:11
A super useful type helper in TypeScript by Matt Pocock from Twitter
/**
* A TypeScript type alias called `Prettify`.
* It takes a type as its argument and returns a new type that has the same properties as the original type,
* but the properties are not intersected. This means that the new type is easier to read and understand.
*/
type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
@wojtekmaj
wojtekmaj / jest-to-vitest.sh
Last active July 29, 2026 14:08
Automatically migrate Jest project to Vitest
#!/bin/bash
# Ensure we're working on the latest version of the main branch
git switch main
git fetch
git pull
# Create a new branch
git switch -c vitest