<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
    <title>Codemzy's Blog RSS Feed</title>
    <link>https://www.codemzy.com/blog</link>
    <description>Codemzy's Blog rss feed. Hello! I am Codemzy and I love to code. JavaScript is my favourite flavour. I blog about coding, software and my projects.</description>
    <item>
        <title>How to respond to missed calls with a text message on iPhone</title>
        <link>https://www.codemzy.com/blog/missed-call-text-message-iphone</link>
        <guid>https://www.codemzy.com/blog/missed-call-text-message-iphone</guid>
        <pubDate>Fri, 26 Jun 2026 08:48:00 GMT</pubDate>
        <description>When I couldn't get iOS shortcuts to automatically reply to missed calls with a text message, here are three workarounds I came up with to respond to missed calls instead.</description>
    </item>
    <item>
        <title>Turning my iPhone into a sunrise alarm clock</title>
        <link>https://www.codemzy.com/blog/iphone-shortcuts-sunrise-alarm</link>
        <guid>https://www.codemzy.com/blog/iphone-shortcuts-sunrise-alarm</guid>
        <pubDate>Mon, 02 Mar 2026 11:03:00 GMT</pubDate>
        <description>Here's how I built a sunrise alarm clock for travel using the Shortcuts app and the torch on my iPhone.</description>
    </item>
    <item>
        <title>Fixing MongoDB sort exceeded memory limit error with aggregation and projection</title>
        <link>https://www.codemzy.com/blog/mongodb-sort-exceeded-memory</link>
        <guid>https://www.codemzy.com/blog/mongodb-sort-exceeded-memory</guid>
        <pubDate>Tue, 02 Dec 2025 13:28:00 GMT</pubDate>
        <description>Here's how I fixed the `sort exceeded memory limit` MongoDB error without `allowDiskUse` by optimising the query, switching my find command to aggregation, and rearranging the order of my query.</description>
    </item>
    <item>
        <title>My React file/folder structure 2025 changes</title>
        <link>https://www.codemzy.com/blog/react-file-structure</link>
        <guid>https://www.codemzy.com/blog/react-file-structure</guid>
        <pubDate>Thu, 02 Oct 2025 15:41:00 GMT</pubDate>
        <description>In this blog post, I’ll discuss my current React file/folder structure for 2025, and the changes I have made, including getting rid of barrel files, consistent file naming strategies, and adding a features directory.</description>
    </item>
    <item>
        <title>Getting a case insensitive sort in MongoDB with collation</title>
        <link>https://www.codemzy.com/blog/case-insensitive-sort-mongodb</link>
        <guid>https://www.codemzy.com/blog/case-insensitive-sort-mongodb</guid>
        <pubDate>Wed, 10 Sep 2025 16:06:00 GMT</pubDate>
        <description>You can use the sort() method to tell MongoDB to order returned documents by the values of a field in alphabetical order - but it's case-sensitive by default. Here's how to get a case-insensitive sort with a collation index.</description>
    </item>
    <item>
        <title>How to force webpack to change the [contenthash]</title>
        <link>https://www.codemzy.com/blog/webpack-change-contenthash</link>
        <guid>https://www.codemzy.com/blog/webpack-change-contenthash</guid>
        <pubDate>Fri, 29 Aug 2025 09:47:00 GMT</pubDate>
        <description>If browsers cache a corrupted version of your lazy-loaded bundles, you might need to force a reload. You can only change the `[contenthash]` if the code changes, but here's a workaround!</description>
    </item>
    <item>
        <title>Fixing Heroku H18 server request interrupted errors with Node.js</title>
        <link>https://www.codemzy.com/blog/heroku-h18-errors-nodejs</link>
        <guid>https://www.codemzy.com/blog/heroku-h18-errors-nodejs</guid>
        <pubDate>Wed, 19 Feb 2025 16:50:00 GMT</pubDate>
        <description>Do you get H18 errors in Heroku? Are you running a Node.js server? Me too! Here's how I finally got rid of those H18 errors, by checking the request has ended before responding.</description>
    </item>
    <item>
        <title>How to convert strings to ObjectIds in MongoDB</title>
        <link>https://www.codemzy.com/blog/mongodb-convert-string-to-objectid</link>
        <guid>https://www.codemzy.com/blog/mongodb-convert-string-to-objectid</guid>
        <pubDate>Wed, 11 Dec 2024 17:10:00 GMT</pubDate>
        <description>ObjectId's are not strings in MongoDB, but they might get converted to strings when you send them to the browser. Here's how to convert them back, and fix any ObjectId strings saved in your database.</description>
    </item>
    <item>
        <title>Google fonts alternatives for GDPR (and how to self host fonts)</title>
        <link>https://www.codemzy.com/blog/fonts-alternatives-gdpr</link>
        <guid>https://www.codemzy.com/blog/fonts-alternatives-gdpr</guid>
        <pubDate>Wed, 27 Nov 2024 17:01:00 GMT</pubDate>
        <description>Google Fonts might not be GDPR compliant. Here are two alternative options (hosted and self-hosted) you can use instead, and how to set them up on your website.</description>
    </item>
    <item>
        <title>Adding a page break to Tiptap</title>
        <link>https://www.codemzy.com/blog/tiptap-page-break</link>
        <guid>https://www.codemzy.com/blog/tiptap-page-break</guid>
        <pubDate>Fri, 08 Nov 2024 13:27:00 GMT</pubDate>
        <description>I'm adding a simple way to create a page break in Tiptap. It's not a full paged display, but it allows users to force a page break before a heading or at the end of a chapter.</description>
    </item>
    <item>
        <title>useRef to get the width and height of an element in ReactJS</title>
        <link>https://www.codemzy.com/blog/reactjs-useref-width-height</link>
        <guid>https://www.codemzy.com/blog/reactjs-useref-width-height</guid>
        <pubDate>Mon, 02 Sep 2024 16:50:00 GMT</pubDate>
        <description>In this blog post, we will `useRef` to get the width and height of a DOM element in ReactJS. We will also add an event listener to listen to the resize event for width and height changes.</description>
    </item>
    <item>
        <title>Catching MongoDB E11000 duplicate key error in Node.js</title>
        <link>https://www.codemzy.com/blog/mongodb-duplicate-key-error</link>
        <guid>https://www.codemzy.com/blog/mongodb-duplicate-key-error</guid>
        <pubDate>Fri, 16 Aug 2024 11:45:00 GMT</pubDate>
        <description>Unique indexes are useful in MongoDB for preventing duplicate data. Here's how I catch the duplicate key error so I can send a human-readable response to let users know what the problem is.</description>
    </item>
    <item>
        <title>How to generate 4 digit random number code in JavaScript</title>
        <link>https://www.codemzy.com/blog/javascript-random-number-code</link>
        <guid>https://www.codemzy.com/blog/javascript-random-number-code</guid>
        <pubDate>Wed, 03 Jul 2024 16:35:00 GMT</pubDate>
        <description>Here's a JavaScript function I built to create a random 4-digit OTP code with leading zeros. And how I extended it to create shorter and longer codes too!</description>
    </item>
    <item>
        <title>Pretty print JSON responses with Express</title>
        <link>https://www.codemzy.com/blog/express-pretty-print-json</link>
        <guid>https://www.codemzy.com/blog/express-pretty-print-json</guid>
        <pubDate>Thu, 27 Jun 2024 14:05:00 GMT</pubDate>
        <description>Here are some ways you can pretty print your JSON responses to the browser with Express in Node.js - either globally or for a single route, using the `space` property of `JSON.stringify()`.</description>
    </item>
    <item>
        <title>How to upload files to DigitalOcean Spaces with Node.js</title>
        <link>https://www.codemzy.com/blog/nodejs-upload-files-digitalocean-spaces</link>
        <guid>https://www.codemzy.com/blog/nodejs-upload-files-digitalocean-spaces</guid>
        <pubDate>Wed, 29 May 2024 14:00:00 GMT</pubDate>
        <description>In this blog post, we will create a function to upload a file to DigitalOcean Spaces using Node.js and the AWS SDK.</description>
    </item>
    <item>
        <title>React axios interceptor examples (with hooks &amp; context)</title>
        <link>https://www.codemzy.com/blog/react-axios-interceptor</link>
        <guid>https://www.codemzy.com/blog/react-axios-interceptor</guid>
        <pubDate>Fri, 17 May 2024 09:15:00 GMT</pubDate>
        <description>Axios works great with React, but if you want to use hooks or context within your interceptors you might find it a little tricky. In this blog post, we'll look at a couple of ways you can get hooks in your interceptors, and create an axios context provider for React.</description>
    </item>
    <item>
        <title>React authentication examples (context, React Query, &amp; both!)</title>
        <link>https://www.codemzy.com/blog/react-auth-context-vs-react-query</link>
        <guid>https://www.codemzy.com/blog/react-auth-context-vs-react-query</guid>
        <pubDate>Fri, 03 May 2024 16:27:00 GMT</pubDate>
        <description>How do you handle authentication in your React app? In this blog post, I'll set up auth state with context and React Query - and then use them together for the best of both worlds!</description>
    </item>
    <item>
        <title>Creating a CSP report-uri endpoint with Cloudflare functions</title>
        <link>https://www.codemzy.com/blog/cloudflare-function-csp-report</link>
        <guid>https://www.codemzy.com/blog/cloudflare-function-csp-report</guid>
        <pubDate>Fri, 12 Apr 2024 06:00:00 GMT</pubDate>
        <description>Here's how I used Cloudflare functions to create a "report-uri" endpoint for my CSP policy. The Cloudflare worker gets the CSP violation report and logs it so I can review and react!</description>
    </item>
    <item>
        <title>How to get response body from fetch() in javascript</title>
        <link>https://www.codemzy.com/blog/response-body-from-fetch-in-javascript</link>
        <guid>https://www.codemzy.com/blog/response-body-from-fetch-in-javascript</guid>
        <pubDate>Thu, 11 Apr 2024 14:50:00 GMT</pubDate>
        <description>When you use the JavaScript Fetch API, `response.body` might not work like you hoped it would. So if you run into errors like "Cannot read properties of undefined (reading 'body')", this blog post will help you fix it!</description>
    </item>
    <item>
        <title>Using arrays for multiple conditional class names in React</title>
        <link>https://www.codemzy.com/blog/multiple-conditional-class-names-react</link>
        <guid>https://www.codemzy.com/blog/multiple-conditional-class-names-react</guid>
        <pubDate>Thu, 21 Mar 2024 16:00:00 GMT</pubDate>
        <description>The `className` prop can get pretty messy in React once you start adding multiple conditional class names to it. Here's how I use an array to avoid extra whitespace and confusing code.</description>
    </item>
</channel>
</rss>