Skip to content

Instantly share code, notes, and snippets.

View ddoronin's full-sized avatar
🏠
In The Matrix

Dima Doronin ddoronin

🏠
In The Matrix
View GitHub Profile
@ddoronin
ddoronin / compression-dictionary-transport-kit.md
Last active August 10, 2026 13:27
compression-dictionary-transport-kit
name compression-dictionary-transport-kit
description Portable, framework-agnostic kit for adding Compression Dictionary Transport (RFC 9842, "dcz") to ANY project with a JS/CSS build step and a server that can set response headers — not tied to any specific stack. Copy the files in this skill into the target project and wire them in. Use when asked to add/implement compression dictionaries, shared dictionaries, or `dcz` support in a project.

Compression Dictionary Transport — portable kit

A drop-in implementation of RFC 9842 (Compression Dictionary Transport, the dcz content-coding). Copy the files below into the target project, fill in the two adapter functions for its

@tpae
tpae / minHeap.js
Last active April 8, 2024 14:14
JavaScript implementation of Min Heap Data Structure
// Implement a min heap:
// -> insert, extract_min
// property:
// - elements are in ascending order
// - complete binary tree (node is smaller than it’s children)
// - root is the most minimum
// - insert takes O(logn) time
// - insert to the bottom right
@ddoronin
ddoronin / gist:61e9bfea1d62b0052403
Last active August 29, 2015 14:23
Require Light
(function(global) {
var serviceRegistrar = {};
function resolve(serviceName) {
if (typeof serviceRegistrar[serviceName] === 'undefined') {
throw new Error('Service "' + serviceName + '" cannot be instantiated.');
}
return serviceRegistrar[serviceName];
}
@ryanchang
ryanchang / lldb_cheat_sheet.md
Last active June 21, 2026 10:43
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type