- How to Type the React children Prop in TypeScript· 5 min read
Type React children as ReactNode, fix React.FC's missing children since React 18, and know when to use ReactElement, PropsWithChildren, or a render function.
- React onBlur Event Type in TypeScript· 4 min read
Type a React onBlur handler as React.FocusEvent<HTMLInputElement>, pick the right element type, avoid the DOM FocusEvent, and use relatedTarget to track focus.
- Fix Next.js Static Export URLs Returning 404 on Refresh· 4 min read
Next.js static export pages 404 on refresh because /about is saved as about.html. Fix it with trailingSlash: true or an nginx try_files rule on your own server.
- What's Inside a JWT and How to Decode It Locally· 6 min read
Decode a JWT with jq or Node.js, read the header and claims, convert exp to a date, and see why decoding doesn't verify it or make it safe to paste online.
- How to add Sentry MCP to Claude Code· 5 min read
Add the Sentry MCP server to Claude Code with one command and a /mcp login, scope it to one project, or run it locally with a token for self-hosted Sentry.
- How to add Playwright MCP to Claude Code· 4 min read
Add the Playwright MCP server to Claude Code with one command, fix the 'chrome is not found' error, pass flags like --headless, and keep .playwright-mcp out of git.
- How to add GitHub MCP to Claude Code· 4 min read
Add the GitHub MCP server to Claude Code with one claude mcp add-json command, keep the PAT out of your config, and switch to read-only or specific toolsets.
- Build a Claude Code Skill That Uses the Google Search Console API· 7 min read
Set up a Google Search Console API service account, grant it Restricted access, and wrap a searchAnalytics query script in a Claude Code skill, cloud included.
- How to Change Ports on Multica Self-Hosted Localhost· 3 min read
Change the default frontend and backend ports on Multica self-hosted so it stops clashing with other local projects on 3000 and 8080. No image rebuild needed.
- Fix @tailwindcss/oxide Native Binding Error in pnpm Workspace with Next.js· 4 min read
Getting 'Cannot find native binding' for @tailwindcss/oxide in a pnpm workspace with Next.js Turbopack? Here's why it happens and how to fix it.
- Use Multiple Claude Code Accounts with CLAUDE_CONFIG_DIR· 6 min read
Use CLAUDE_CONFIG_DIR to run multiple Claude Code accounts with separate logins, hooks, skills, MCP servers, and CLAUDE.md files without touching ~/.claude.
- Local-Only Excludes with .git/info/exclude· 4 min read
Ignore personal files in one repo with .git/info/exclude instead of .gitignore. How it compares to .gitignore and core.excludesFile, and how to check with git.
- How to add the Datadog MCP server to Claude Code· 3 min read
Let Claude Code read your Datadog monitors, logs, metrics and APM. One claude mcp add command for the Datadog MCP server, OAuth login, and fixes for empty results.
- How to Add the PagerDuty MCP Server to Claude Code· 5 min read
Add the PagerDuty MCP server to Claude Code with one command: User API key, the archived local uvx server vs the hosted endpoint, EU accounts, write tools.
- How to Trigger React Error Boundary (Dev and Test)· 4 min read
Trigger a React error boundary by throwing during render, testing the fallback in Jest, and using showBoundary for async or event-handler errors.
- Mock IntersectionObserver in Jest Setup· 4 min read
Fix `IntersectionObserver is not defined` in Jest by adding a clean global mock in `jest.setup.ts`. Includes TypeScript-safe setup and a test example.
- Pass Environment Variables from GitLab CI to Ansible Shell· 2 min read
Pass GitLab CI variables safely to Ansible shell tasks with extra-vars and task-level environment. Also explains why `export` in one task is not persisted.
- Check If Clicked Element Is Descendant Close On Click Outside· 3 min read
Detect a click outside a modal or dropdown in React with Node.contains(), and close it by checking if the clicked element is a descendant.
- Eslint Enforce Named Function In Useeffect· 2 min read
Anonymous functions in useEffect show up as 'Anonymous function' in stack traces. Three ways to name your effect functions: a plugin, a rule, or a pattern.
- Fix "Property 'value' does not exist on type 'EventTarget'"· 2 min read
TypeScript types event.target as EventTarget, which has no value. Use React.ChangeEvent<HTMLInputElement> or cast the target to HTMLInputElement.
- Fix useRef "Property does not exist on type 'never'"· 3 min read
useRef(null) types ref.current as null, so an if check narrows it to 'never'. Pass the element type with useRef<HTMLInputElement>(null), or JSDoc in .jsx.
- Fix Jest "window.matchMedia is not a function"· 3 min read
jsdom in Jest has no window.matchMedia, so components that call it throw a TypeError. Add a matchMedia mock to your Jest setup file.
- How to Make the z Alias Work in Non-Interactive Bash Shells· 3 min read
The z alias from zoxide doesnt work in non-interactive bash shells like cron jobs or tool subshells. Heres how to fix it with BASH_ENV.
- How to Expose Localhost with Cloudflare Tunnel· 3 min read
Get a public HTTPS URL for localhost with one cloudflared quick tunnel command. No account needed. Handy for testing GitHub, Slack, or Stripe webhooks locally.
- How to Set Up Wildcard Subdomains with Caddy and DigitalOcean· 5 min read
Set up wildcard subdomains with Caddy and DigitalOcean using DNS challenge. Build Caddy with the DigitalOcean DNS module and serve subdomains over HTTPS.
- How to Handle CORS When Using json-server· 3 min read
Fix CORS errors in json-server with a custom server.js and middleware. Covers preflight OPTIONS requests and when to use wildcard vs specific origin.
- How to SSH Tunnel to a Remote PostgreSQL Container· 4 min read
How to securely connect to a PostgreSQL database running inside a Docker container on a remote server, using an SSH tunnel — no open ports required.
- Command to Add Sequential Thinking MCP to Claude Code· 2 min read
Add Sequential Thinking MCP to Claude Code with one command, check that it is active with claude mcp list, and fix common setup errors.
- Command to Add Context 7 MCP on Claude Code· 2 min read
Add Context7 MCP to Claude Code with one command, check that it is active with claude mcp list, and fix common install problems.
- 5 Examples of Applications for Learning JavaScript· 10 min read
Discover 5 simple applications to enhance your JavaScript skills. Dive deeper into learning by trying out these JavaScript examples today!
- Fixing Jest Error: 'Not Implemented window.scrollTo'· 2 min read
Fix "Not implemented: window.scrollTo" (or "Window's scrollTo() method" in jsdom 27+) in Jest or Vitest by mocking window.scrollTo in your setup file.
- Fix "ReferenceError: ResizeObserver is not defined" in Jest· 1 min read
Fix "ReferenceError: ResizeObserver is not defined" in Jest by mocking ResizeObserver in your setup file, so components that use it run in jsdom.
- Setting NPM Version Without 'v' Prefix· 2 min read
Make npm version create tags like 1.2.3 instead of v1.2.3 with tag-version-prefix. Covers project vs global config, CI release scripts, and a rollback.
- Printing GitLab CI Environment Variables· 1 min read
Print GitLab CI environment variables for debugging with printenv, filter by prefix, and mask secrets so tokens never end up in job logs.
- Testing Next.js Image Component· 3 min read
Test the Next.js Image component in Jest by mocking next/image as a plain img tag, then assert alt text and src. Includes a component test and common mistakes.
- Testing the next-i18next Library with Jest· 2 min read
Test components that use next-i18next in Jest by mocking useTranslation so t() returns the key. Includes a component test and a global Jest setup file.
- How to Resolve 'Cannot use import statement outside a module' Error when Mocking Swiper JS with Jest· 2 min read
Fix Jest's 'Cannot use import statement outside a module' error with Swiper by letting transformIgnorePatterns transform it, or mock Swiper in unit tests.
- Resolving Jest Error with EMFILE Too Many Open Files· 2 min read
Fix the Jest EMFILE too many open files error by lowering maxWorkers, ignoring build folders, raising ulimit, and running in band on CI.
- Comprehensive Guide: Mocking Next.js useRouter with Jest for Effective Testing· 2 min read
Mock Next.js useRouter in Jest to control pathname and query and assert router.push, with a dynamic route example and the App Router next/navigation variant.
- Fixing 'Digital Envelope Routines Unsupported' Issue on Apple Silicon Processors· 1 min read
Fix the OpenSSL error digital envelope routines unsupported on Apple Silicon with the --openssl-legacy-provider flag, then upgrade your tooling.
- Changing the Base Branch for Merging in Git· 1 min read
Fix a feature branch based on the wrong parent with git rebase --onto, plus backup and force-with-lease checks that avoid losing work.
- Resolve 'ERROR System Limit for Number of File Watchers Reached' Issue· 1 min read
Fix the ENOSPC file watcher limit error on Linux when running Next.js, Vite, or Jest by raising the inotify limits, with commands to verify.
- Setup Nodemon with Babel· 2 min read
Run a Node.js project with nodemon and Babel: install @babel/node and preset-env, add a .babelrc, and add a start script that reruns modern JavaScript on save.
- Webpack Configuration: Including Specific Moment.js Locale· 2 min read
Keep only the Moment.js locales you need in Webpack with ContextReplacementPlugin, so the bundle stops shipping every locale, and check the size drop.
- Debugging 'window.scrollTo' Invocation for Identifying the Caller· 1 min read
Find exactly where window.scrollTo is called in Jest tests using console.trace, jest.spyOn, and a few quick steps to narrow down the caller.