TIL - Things I learned

accessibility

Short lessons learned

How should a radio group/button behave with keyboard entry

How to disable focus outside of a modal

ai-artificial-intelligence

How to build an app from scratch with AI only

ML and AI first steps...

algorithm-cs-principles

Algorithms

Data structures

animation

Motion canvas hard to find items

SVGs explained

api

How to design good APIs

apple-script-automation

How to size an app window exatly to px width & height with apple script?

architecture-lang-agnostic

State machines

How to sync clocks across machines

books

Books on lower level & arch learning

browsers-in-depth

How to browsers work (under the hood)?

How does networking work and what are the important parts to know?

bundlers

Bundling best practices...

esbuild

How to create tiny JS npm libraries

Using rollup

How to create a standlone powerful build-free setup with preact

career-advice

chrome

How do I bypass the chrome "this site is unsafe" warning when there's no button to continue?

chrome_extensions

How to give your extension access to all sites

How to allow access to current tab only after clicking the extension button

How to change the commit author for past commits

How do you auto-refresh the extension during dev work?

How to block requests

What output format should you use for chrome extensions if you bundle and use esm?

How do I detect a page refresh from the Chrome extension background (SW)

How to redirect a url to a local file with extension

Extension local developer experience

How do I send a message from the page (content script) to the bg script (SW)

Extension works great for me, but for them the extension won't go active when they expect

conference-speaking-applying-presenting

How to write a great CFP

css

How to make a grid with variable number of columns as narrow as the content

databases

Common queries I need when writing sql in jupyter notebooks

databases-browser-storage

Dexie as a local database in the browser

Local-first databases...

How do you model nosql databases?

How can I use browser storage for a lot of data and be able to query it in a nice way?

electron

How do I get the node source files from a packaged electron app?

How to run a packaged electron from the terminal and see the logs (stdout)

fe-framework-nextjs

Next.js isms and best practices to follow

How to eliminate dead code with next.js app router (14+)

How to fix the `extra attributes from server` error

How to fix the nonce hydration error

How to handle React / Next.js rehydration errors

What is a provider in React/Next.js?

React server components (RSC) with Next.js

Next-js 13+ RSC-based routing

Should I use `<script>` or `<head>` tags in Next.js 13+ app router?

React / Next.js loading best practices with suspense...

fonts

consider https://www.fontpair.co/

game-development

Can you use AI to generate game assets?

How to prep screenshots and previews for app store release on app store connect

Vector art

Animation curves and easing explained

Game related geometry

How to add a debounce

Find childnodes by type or name

How to find a parentnode of a script

How to import and reuse script modules in Godot

How do I move the scrollbars of a scrollcontainer with gdscript...?

How to detect multi touch gestures like pinch-zoom in Godot

How do I run code only in the editor or only in dev mode (spawned from editor)?

Why won't my control scale properly in gdscript?

How to throw an exception at compile time

How do I deploy my game to my iphone/ipad?

Using signals and events in Godot

Godot GUI and Button how tos

How to share a texture across different nodes

UI Positioning and sizing in Godot

What tools do I use for certain use cases?

Why does changing scale change the position?

How to zoom in a camera in Godot

gear-hardware

Keyboards I want

What external monitor is good for retina macbook so fonts don't look blurry?

git

The how and why of changelogs

How to checkout and track a remote git branch

How should I format my commit messages?

How to easily choose theirs or ours for git conflict

How do you copy file content only and not the git history from other branches

How to exclude a file from git diff

How do I find a missing piece of code (deletion)?

How to apply a git change manually without having to type it or copy/paste it

Using git worktree to work with several git branches at the same time

How to preserve git history when renaming/moving a file with git

Git process: How to release with a release branch

How to push a local branch to remote when the branch names differ

How to reset a git folder back to HEAD (last commit)

github-pages

How to find the url of your github pages

homebrew

How do I find the location where brew installed a package.

Homebrew

html

Browser native expand/collapse section

icons-etc

Icons and where to get them

javascript

Working with Abstract syntax Trees (AST)

How to fill an array with same value many times

How to freeze an object at time of logging instead of having it live?

How can I console log an object with depth and proper formatting?

How do uncaught exceptions in JS affect code execution?

ES modules (ESM) and circular deps gotchas

How to have dynamic exports with es modules ESM?

How to use dynamic import with default export?

What is execution context and how can we pass it in?

How to filter out undefined items in an array

How to define / override native element properties

How to detect an infinite loop in JavaScript and recover from it

How do I prevent writing / changing a property or an object and make it readonly (from the outside at least)

How to sandbox untrusted JavaScript code execution

TODO:

How can we incrementally execute code 1 line at a 1 time?

Modern ways of iterating through objects

Using performance.measure() and timeOrigin

Regex: Extract a value using regex groups

Send beacon API

Signals in JavaScript

Why does the dom appear to be stale sometimes?

What is strict mode in JavaScript?

How to get the variable name as a string from a variable

job-interviewing

Turbo repo team interview

job-search

life-skills

lua

How to see if string includes another

markdown

What libraries are good for parsing .md -> html?

metrics-and-monitoring

Distributed tracing

neovim-lua

For Neovim, and Lua and using them together.

Virtual text and field mirroring with snippets using extmarks

How to get filname(path) of the current buffer?

How to map control shift to neovim since most terminals ignore ctrl+shift

How to map keys in neovim using lua

How to pass options to vim commandbar options

How to get bufferPath relative to project root in Lua/Nvim?

How to run a shell command in Lua/nvim and save the output to a variable

Tricky neovim commands

How to troubleshoot neovim

node.js

How to import json files with esm in node?

How to convert 'file:/' fileUrl to normal node path

ESM and resolving relative paths in node

How do you run things in parallel in node?

How do I get prettier errors on the terminal?

How to measure server time in node.js (duration of request->response)

Unable to get local issuer certificate

npm

Best npm publish setup

How do I exclude bundling libs like react when building a react plugin?

How to bundle a typescript library and publish with npm?

How to debug and verify installed module versions

How to modify and test npm module changes locally

How to npm install from private github (enterprise or private repo?)

How do I stop the annoying peer dep issues in npm8

How to version alpha pre-releases with npm

Should I use npm install local/path/x/ or npm link x for testing & building local npm deps?

How to override a denpendencie's dependency in package.json?

How to export sub paths from a library?

Use case -> Monorepo

Why is my readme blank on npm?

npm workspaces for monorepos

observability

How to create custom otel traces & spans

Opentelemetry

performance

How to measure / start timer for "navigate" like (click on link) etc...

How can I measure when a refresh / page navigation has started?

Tooling for load testing

postgres

How to run postgres locally on a mac

How to start/restart postgres from homebrew

principles-and-analogies

DRY (don't repeat yourself) is an overrated principle and often causes more harm than good...

Analogies for making rapid progress with POC / high uncertainty

principles-to-live-and-work-by

Bias to Action

on Imposter Syndrome

Show don't tell

programming-agnostic-principles

How to interop across languages

Strategies for learning new programming languages

publishing

python

How to fix `Python not found` issues

quotes

Radical vision, incremental progress

react.js

How to reset a component and re-mount it

replit

How to add a build step to html/css repl?

Product ideas & improvements

How do I listen for a server and automatically have that pop a browser window open on replit?

How to get vite hmr working on replit in a node container

rust

How to create new arrays in Rust

How to convert a rust buffer (bytes) to a string (utf-8)

Debugging rust programs with lldb

Debugging Rust with GDB / LLDB

Error handling in rust

Using rust with other languages (like C)

How do you run examples for cargo crates

How to send messages between objc and rust interop

How to print array contents in Rust

How to print an array item inside a string in Rust

How to return an expression from a function in Rust

What is a slice in Rust

How do you test custom branches of packages... in rust?

How to build and test rust executable on mac

How to write tests for Rust apps

How do you upgrade rust with rustup

rust-cargo

How do you resolve local self-signed issuer problems like we see with node/npm

screencasting-streaming

Streaming & Screencasting software overview

How to convert a .mov (quicktime) file to .mp4 on mac

Gifsky for high quality animated gifs

Using mpg to capture the screen?

OBS Settings I like for recording screencasts

Record ascii terminal videos (tiny text output)

# TODO:

Adding music / sounds to videos

What mic should I use

tauri

How to I fix the "unable to verify binary as safe error in a sidecar in macOS after downloading a binary."

How to handle a menu event in JS

How do you store persistent state in Tauri? Databases?

teaching-tooling

Explain my stacktrace

JS Execution visualizer...

Teaching tool: Scope visualizer

terminal

Using broot to fuzzy search file trees

Modern replacements for linux(and macos) terminal commands

How to find replace across files and folders

How to substitute commands in Fish

How to open the result of fzf in your editor

Best ways to sync 2 folders on mac terminal

History of terminals and technical context

testing

Best practices and (soft) rules I like for writing tests

Jest errors on require() statements that are auto-converted to import esm

Pain points when migrating a test (suite) from jest to vitest

Want to use JSDOM with Jest

How to get values from the page in playwright

How can I assert against an object where some values are dynamic?

How to use done() (async) tests for callbacks in vitest?

How to use the chrome debugger for vitest test files

How to mock get accessors for globals like window.sessionStorage

How to delete import/require cache and re-import module for each test with Vitest

How do I solve these strange vitest errors?

How to suppress stderr for errs during tests we'd expect

How to type narrow with TS and vitest in TS tests

tokenizers-parsers-lexers

Readme:

Treesitter for syntax highlighting, tokenizing etc...

trpc

How to use trpc with next-js 13 app router

How to verify that the server pieces work

turborepo

Turborepo

typescript

Common TypeScript errors.

How do I generate enums from an object?

TS4023: Exported Variable `<x>` has or is using name `<y>` from external module but cannot be named

How to type functions...

Generics in TS

How to get es-modules (ESM) working with TS

How to adopt TS smoothly...

How to force type coersion in TypeScript

How do you import ts types for dev without bundling them for prod?

How to run a typescript script from the command line.

How do you type object keys in TypeScript?

How to upgrade your TS version for your app

How can I infert the param types from another function so I can just pass through?

How can I infer a type from a function return?

Input validation with zod (TS compatible)

When should I use interface vs type?

How to supercharge union type hinting with pretty-union

How do you manage/fix recursive types?

How to re-run tests when ts files change

How to runtime assert to verify type and use that to narrow down the TS type

In TypeScript how do I limit a param to certain values?

How to extract a member of a discriminated union without importing it explicitly

How to handle TS in a monorepo well

Invalid TS errors on array index lookup

How can I type data from a JSON file in TypeScript?

When should I use Union vs `as const`

Why use TypeScript?

How to widen a narrow library type from userland

visualizations-graphics-diagrams

Visualization tools

First principles of diagramming

Visualizing coding concepts & flow & tooling...

vite

How do I disable the file hash suffix for generated files in Svelte and Vite?

volta

How to install yarn globally when volta won't let you

web-dev-ecosystem-tooling

Which bundler should I use

Cli tooling that's helping making CLIs

Making working with emojis easier

How to format and search JSON easily on the terminal

Local-first databases...

What tools are good / best for common use cases?

web-dev-general

How to animate a diagram with CSS/JS

How to fix local certificate issues?

If you have a page that's showing a stale cache you have a few options to bust

How do I decode/unescape html entities in a string

How do I force the "wifi login" page (aka captive-portal)

Why won't my image show up? - Absolute vs relative file paths

What are some good logging libraries to use for node.js or the browser?

Stand alone testing libs

How to troubleshoot live issues

writing

Books on writing better online for non-fiction

y_content-courses-i-want-to-make

Content & Courses I want to make / ideas

Techniques for blog posts and visualizing code (transitions)

yarn

How do you list package in yarn (for a workspace)

z_projects-i-want-to-build-someday

Projects I want to build someday

Better Diff

Focus Chrome extension

Rust/wasm: Image pixel blurry ator

JS Execution tracer

JS interpreter that runs in JS

Feed in minified code and make it more readable

Language server

Re-write linux commands like ls in node/rust (esp rust)

Rust emoji snippet expander

Rust based CLI proxy for focus mode

Folder watcher in Rust

JSDom alternative written in rust...

node-spy written in rust

Prettier clone written in Rust

Home-grown search engine of til repos on github

Skills I want to grow

Tiny talker. Wordle style (how it's built, not the UI)

Automatically generate excalidraw or mermaid graphs from a loop (viz loop

animation___motion-canvas

How to animate a line with bubbles in motion canvas

How to animate a rect box along a path in Motion Canvas

want-to-try___software-apps

Image processing & editing apps I want to try

linear - good task / issue tracking for solo?

y_content-courses-i-want-to-make___roundups

Finding a good video host for educational content (just starting out)