Skip to content

Instantly share code, notes, and snippets.

View kurtextrem's full-sized avatar

Jacob Groß kurtextrem

View GitHub Profile
@johnsoncodehk
johnsoncodehk / tsslint_3.1_eslint_rules_at_16x.md
Last active May 1, 2026 03:24
TSSLint 3.1: running ESLint rules at 16× speed

Running ESLint rules at 16× speed in TSSLint

On Dify web/ (5860 .ts / .tsx files), running one type-aware rule:

Wall (min of 3) Peak RSS
ESLint Linter 25 s 7.0 GB
TSSLint 3.1 1.5 s 3.75 GB

Native linters (Rust's Oxlint and the like) hitting 10× is normal — that's the cross-runtime gap. JS-vs-JS usually lands at 1.5-3×. This 16× is the same V8, the same ESLint rule source, the same ESTree shape — the gap is all architecture. 3.1 is a full rewrite of @tsslint/compat-eslint (the compatibility layer that lets stock ESLint rules run inside TSSLint). Bench: tsslint-dify-bench.

@jediahkatz
jediahkatz / SKILL.md
Created January 23, 2026 20:25
Cursor skill for capturing learnings from conversations into reusable skills
name capture-skill
description Capture learnings, patterns, or workflows from the current conversation into a new or existing skill. Use when the user wants to save what was learned, discovered, or built during a conversation as a reusable skill for future sessions.

Capture Skill from Conversation

This skill helps you extract knowledge, patterns, and workflows from the current conversation and persist them as a reusable skill.

When to Use

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

@DarkGL
DarkGL / lowercase.ts
Last active July 13, 2024 19:01
Disable toLowerCase on already lower cased string
// Step 1: Define the Branded Type
type LowercaseString = string & { __brand: "LowercaseString" };
// Step 2: Type Guard Function
function toLowercaseString(s: string): LowercaseString {
return s.toLowerCase() as LowercaseString;
}
// Step 3: Override Type Definitions
type RemoveToLowerCase<T> = Omit<T, "toLowerCase">;

🚀 This project has moved!

Thank you for all the stars and forks! To better manage updates, issues, and versioning, Minimal Analytics 4 has moved to a dedicated GitHub repository.

🚀 What's New in v1.11 (2026 "Gold Master" Release)

This version represents a total architectural overhaul to bring this script in line with professional tracking standards while maintaining a tiny footprint.

@fabiospampinato
fabiospampinato / fastest_escape_html.js
Created June 2, 2021 13:41
The fastest way to escape HTML strings known to me~~n~~, if you need to do so with JS and you are inside a browser.
// Can you make this faster? Ping me.
const escapeHtml = (function () {
const serializer = new XMLSerializer ();
const attr = document.createAttribute ( 'attr' );
const re = /[&<>"]/;
return function escapeHtml ( str ) {
if ( !re.test ( str ) ) return str;
attr.value = str;
return serializer.serializeToString ( attr );

assert() (sometimes called invariant())

Instead of checks like:

if (value === null) {
  throw new Error("missing value")
}
doSomethingThatNeedsValue(value)
@kamranayub
kamranayub / next.config.js
Last active October 15, 2025 13:41
React Production Profiling Support for Next.js
//
// See: https://kentcdodds.com/blog/profile-a-react-app-for-performance#build-and-measure-the-production-app
// See: https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config
const TerserPlugin = require('next/dist/compiled/terser-webpack-plugin');
module.exports = {
webpack: (config, options) => {
//
// Use profiler-enabled React builds
@theodorosploumis
theodorosploumis / Nework_throttling_profiles.md
Last active May 26, 2026 21:33
Web development - Custom network throttling profiles
Profile download (kb/s) upload (kb/s) latency (ms)
Native 0 0 0
GPRS 50 20 500
56K Dial-up 50 30 120
Mobile EDGE 240 200 840
2G Regular 250 50 300
2G Good 450 150 150
3G Slow 780 330 200