- 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.
- How to Trigger React Error Boundary (Dev and Test)· 4 min read
Trigger a React error boundary reliably in browser and Jest tests. Covers render-time crashes, event-handler caveats, plus practical test patterns fast.
- Pass Environment Variables from GitLab CI to Ansible Shell· 5 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.
- Eslint Enforce Named Function In Useeffect· 2 min read
Enforce named functions inside useEffect for better debugging and stack traces.
- Check If Clicked Element Is Descendant Close On Click Outside· 3 min read
Detect click outside a modal or dropdown using contains() method.
- Fix Property Not Existing On Eventtarget Typescript· 2 min read
Fix the common TypeScript error when accessing event properties like target.value.
- React Useref Property Not Exist On Type Never· 2 min read
Fix the confusing TypeScript error when using useRef with proper type arguments.
- Fix Jest Matchmedia Not Defined· 3 min read
Fix the 'window.matchMedia is not a function' error in Jest tests with a quick mock setup.
- 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 your localhost in seconds using cloudflared quick tunnels. No account needed. Perfect for testing webhooks from GitHub, Slack, Stripe, or any third-party service.
- 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· 8 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· 6 min read
Quick setup guide to add Sequential Thinking MCP to Claude Code, verify it works, and fix common setup errors.
- Command to Add Context 7 MCP on Claude Code· 6 min read
Simple guide to add Context7 MCP on Claude Code, check if it is active, and troubleshoot common install issues.
- 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'· 5 min read
Fix the "window.scrollTo is not a function" Jest error with a clean test setup mock and practical verification tips.
- How to Solve the "ResizeObserver is Not Defined" Error in Jest Tests· 2 min read
Resolve the 'ResizeObserver is not defined' error in Jest tests. Our guide shows how to mock ResizeObserver for hassle-free unit testing.
- Setting NPM Version Without 'v' Prefix· 5 min read
Set npm version tags without the default v prefix using one config line, with notes for CI and release flow.
- Printing GitLab CI Environment Variables· 6 min read
Practical ways to print GitLab CI environment variables safely for debugging without leaking sensitive secrets.
- Testing Next.js Image Component· 7 min read
Simple way to test Next.js Image in Jest by mocking it as a plain img tag, plus checks and common mistakes.
- Testing the next-i18next Library with Jest· 6 min read
Simple way to test next-i18next in Jest by mocking translation hooks so component tests stay focused and stable.
- How to Resolve 'Cannot use import statement outside a module' Error when Mocking Swiper JS with Jest· 7 min read
Fix Jest "Cannot use import statement outside a module" when mocking Swiper by adjusting transformIgnorePatterns.
- Resolving Jest Error with EMFILE Too Many Open Files· 7 min read
Fix Jest EMFILE too many open files error with practical config changes, watcher tips, and stable CI settings.
- Comprehensive Guide: Mocking Next.js useRouter with Jest for Effective Testing· 7 min read
Mock Next.js useRouter in Jest with reliable patterns for pathname, query, and push assertions in component tests.
- Fixing 'Digital Envelope Routines Unsupported' Issue on Apple Silicon Processors· 6 min read
Fix the OpenSSL digital envelope routines unsupported error on Apple Silicon with safe Node/OpenSSL workarounds.
- Changing the Base Branch for Merging in Git· 6 min read
Change a feature branch base cleanly with git rebase --onto, plus safe checks to avoid losing work.
- Resolve 'ERROR System Limit for Number of File Watchers Reached' Issue· 6 min read
Fix ENOSPC file watcher limit error on Linux when running Next.js, Vite, or Jest with practical commands and checks.
- Setup Nodemon with Babel· 2 min read
Easily start node project by using nodemon and babel
- Webpack Configuration: Including Specific Moment.js Locale· 6 min read
How to keep only specific Moment.js locales in Webpack to reduce bundle size and avoid loading every locale.
- Debugging 'window.scrollTo' Invocation for Identifying the Caller· 5 min read
How to find exactly where window.scrollTo is being called in tests using spies, stack traces, and quick debug steps.