Code Notes
TILs, snippets—my digital code garden
Stimulus cheatsheet 🔍 Regular expressions 🔒 Locking scroll 🎭 Playwright Text wrapping & word breaking 💯 Intl.NumberFormat 🔢 Intl.PluralRules ⏳ Intl.RelativeTimeFormat Async cheatsheet 🐕 Axios Array methods summarised Big O Notation Native browser loading state Check if JavaScript object is empty Check if value is array in JavaScript 🗜 Clamp number 📦 Clickable box 📝 Commit message guidelines 🦒 Contentful migrations ↔️ CSS Media Queries 💄 CSS Object styles CSS Protips Express middleware testing 🐕 Fetch ⚡ C++ for TypeScript developers 🐠 Fish shell 🍿 Fullscreen video GraphQL GSAP Hexadecimal colour code for transparency 🐹 Golang for TypeScript developers Pluralisation with inflect() 🙅♀️ Ignoring code 📱 is-mobile check 🧪 Jest global mocks 🔑 Keycode 🧪 Nock oEmbed 📨 Postman.io Pure ESM packages React compound components 🎣 useReducer ❌ Removing items from arrays Save scroll position ⚡ Supabase.js 🔦 Switch(true) Technical Job Interview Questions Useful JavaScript functions & snippets URL & URLSearchParams 📤 Web Share 🗣 Webmentions Yalc 🔢 Basic Maths Notation 🔀 Reshaping data in JavaScript Supabase 🧮 CSS Functions 🪺 Native CSS Nesting 🎨 CSS Native Element Theming 🍎 SwiftUI for TypeScript developers ♿ aria-label notes 🐻 Zustand Git worktrees with Graphite Graphite CLI Immer 🚸 IntersectionObserver JavaScript dates 🔁 JS array looping 🧪 Jest 🖼 Native image lazy loading NATS & JetStream Next.js 🏎 Web performance tips 🐍 Python for TypeScript developers ⚛ React Error Boundary ⚛ TanStack Query (React Query) 🎣 useId 🎣 React Context ⚛ React TypeScript Redux / Redux Toolkit 🐘 PHP for TypeScript developers 💅 Styled Components 🦀 Rust for TypeScript developers 📖 Storybook SvelteKit 🧪 Testing library 🎨 Theme UI tmux TypeScript ⚡ Vitest 📑 JSDoc ❌ Get last array item ❌ Remove array duplicates with Set 📝 GitHub markdown Content flow spacing 𝌞 Flexible content without wrapper divs 💽 Postgres Git 📝 README.md / markdown snippets 🤖 Disallow AI bots Nested border radius TypeScript JSON type ⚛ React.forwardRef 🎣 useRef 📰 @font-face 🏋️♂️ font-weight CSS font-stacks ⓫ Eleventy Nunjucks 🔤 Text selection Svelte AI prompts 📦 npm package versions TypeScript type guard Idiot-proof Git Rebasing CSS logical properties and values vh, svh, lvh, and dvh Hyphens and dashes 👓 :focus-visible 💦 Fluid typography 🏎️ Fastest Google Fonts ✂️ VS Code Snippets ✅ Coding standards 🤷♂️ JS body class Disable dark mode for specific Mac apps Make a directory if none exists 🥣 Mix blend mode ⚛ RenderIfRole ⚛ useToggle React Hook VIM cheatsheet Form autofill attributes ⚓️ Better link underlines 👆 CSS cursors 🍱 CSS Grid ⚡ Deno GitHub Actions Shiki Twoslash 🐳 Docker ⚛ Conditionally render on the client or server Run npm script from another directory 🧪 Jest globals Changing the default text editor on macOS 📖 Mock React Router location inside Storybook stories TypeScript catch block errors Vercel Serverless functions 👌 Awesome Web Dev resources ⚛ Formik 🗣 Quotation marks in different countries ⚛ React Query with GraphQL SQL Custom inclusive/accessible Theme UI Button Firebase Plop 📟 Command line tools Gatsby CSS scroll-behavior Check if JavaScript array is empty 🔗 Make a button element look like a link Aspect ratio Scroll-margin-top 🌳 Cypress Git branching strategies 🦉 The “Lobotomised Owl” Selector ♿ Showing/hiding content Test structure ⭕️ CircleCI iOS Safari bug ⚛ SSR HTTP Methods Get selected text Apollo GraphQL 🔘 Better mobile form inputs 🎣 Client-only React Schema.org structured data Get file size for all files in directory 🥱 Async load CSS Rainbow links 💄 Styling siblings on hover 🙅 Big list of naughty strings 🔢 Fixed-width numbers Handling Long Words and URLs (Forcing Breaks, Hyphenation, Ellipsis, etc) Opengraph metacrap 😋 Cutting the mustard 💵 Clear DNS cache 🕺 Classes 📜 Create local self-signed certificate 🧼 Cleanup / optimise computer 🕶 CSS Filters 👍 Favicons 🖼 Picture element 👮♂️ Node Security Redux concepts Redux Saga CSS environment variables Destructuring 🛂 Crypto ES Module import/export syntax ES6 templating 🎬 HTML Video