name: tufte-viz description: | Ideate and critique data visualizations using Edward Tufte's principles from "The Visual Display of Quantitative Information." Use this skill when: (1) Designing new data visualizations or charts (2) Critiquing or improving existing visualizations (3) Reviewing dashboards or reports for graphical integrity (4) Deciding between visualization approaches (5) Reducing chartjunk or improving data-ink ratio (6) Planning small multiples or high-density displays
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Benchmarks for "Exotic `goto`: generators and exceptions" | |
| // https://www.lazutkin.com/blog/2026-08-18-exotic-goto | |
| // | |
| // npm install | |
| // npm run bench # everything below, in order | |
| // npm run bench:escape:early # match at leaf 5, escape dominates | |
| // npm run bench:escape:late # match at leaf 950, traversal dominates | |
| // | |
| // Escaping a nested traversal: labeled break vs a relayed return vs throw. | |
| // gadgets -> gizmos -> doodads, 10 x 10 x 10 = 1000 leaves. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const SIZE = 127; | |
| export const source = new Array(SIZE); | |
| export const target = new Array(source.length); | |
| for (let i = 0; i < source.length; ++i) { | |
| source[i] = i; | |
| } | |
| export default { |
Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.
Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)
▶ gpg --full-generate-key --expert
gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Workflow Orchestration | |
| ### 1. Plan Node Default | |
| - Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions) | |
| - If something goes sideways, STOP and re-plan immediately | |
| - don't keep pushing | |
| - Use plan mode for verification steps, not just building | |
| - Write detailed specs upfront to reduce ambiguity | |
| ### 2. Subagent Strategy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fastPow = (x, n) => { | |
| if (x <= 0) return 0; | |
| if (n === 0) return 1; | |
| if (n === 1) return x; | |
| const result = fastPow(x, n >> 1); | |
| return (n & 1) ? result * x : result; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // doubly linked list | |
| const removeNode = node => { | |
| node.prev.next = node.next; | |
| node.next.prev = node.prev; | |
| node.prev = node.next = node; | |
| return node; | |
| }; | |
| class DLL { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {up, down} from './min-heap.js'; | |
| // more efficient operations based on up() and down() | |
| // WARNING: untested (if I wrote comprehensive tests it wouldn't be a gist, would it?) | |
| const replaceTop = (heapArray, value, less) => { | |
| const top = heapArray[0]; | |
| heapArray[0] = value; | |
| down(heapArray, 0, less); | |
| return top; |
alternatively use: http://geoff.greer.fm/lscolors/
The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.
The color designators are as follows:
a black
NewerOlder
