How to defer scripts in WordPress

You don’t need me explaining you how important it is to defer scripts for performance. If your application doesn’t need render-blocking scripts you should simply defer them. Most of the WordPress blogs/sites do not need render blocking scripts, for toggling menu visibility, swapping emojis for SVG’s, embed media… All these can be deferred no problem. […]

How to create custom commands for Mac’s Spotlight

Out of the box doesn’t seem to be possible πŸ™ BUT! I’ve found a workaround that works almost as nicely πŸŽ‰ There are paid apps out there, but we as developers should do it ourselves πŸ‘¨πŸ»β€πŸ’» To learn from it and to feel like a hacker. πŸ’‘ Create a bash script I want to able […]

How to do multiple StaticQuery in Gatsby

If you need to do more than one GraphQL StaticQuery in Gatbsy you can assign each query to a name. Then simply access data.yourName and you’re ready to go. Here’s a full example of how I use it on my reviews site:

How to remove client-side JavaScript from Gatsby

I build my reviews site using Gatsby. It’s cool, the graphql is powerful but there’s something that was buggering me. Why does my static site need client-side JavaScript? There’s no reason for it. Gatsby will argue about faster route changing this way, sure. For a high-traffic site where users visit multiple pages on the same […]

How to set docs as homepage for Docusaurus

If you’d prefer to show the Docusaurus docs section as a homepage instead of the regular landing page, you can use the snippet below. There are several ways to do this. From a simply server redirect, to the a hacky JavaScript redirect to the much desired official approach down below. Official solution: configure the docs […]

Stop blindly preloading fonts

For a while now I thought that preloading your custom fonts was the way to go. In my defense in the past that was the recommended approach. Well, no longer πŸ‘‹ I did a quick test with my cat’s site and the result is clear: What exactly happened here? The fonts stopped being a […]

How to DELETE with LIMIT and OFFSET in MySQL

It has been ages since I needed to write MySQL queries. I barely remember the basics. I found myself perplexed after learning DELETE does not allow you to specify a limit. I thought it simply acted as a SELECT but the results instead of being returned where deleted. It seems you need to nest 2 […]

Creating a custom RSS Reader with PHP

Before you eye roll me πŸ™„ after saying PHP, hear me out. πŸ’¬ What’s your current RSS reader? Please tell me you still use RSS πŸ™, you should, everybody should. I used to use Feedly and there was nothing wrong with it. At least for my use: Open it from time to time. Get my […]

Creating a Link Manager with WordPress

You know I’m a huge WordPress fan and I rely on it whenever I need a CMS. At this point pretty much everything is possible, don’t want to mess with PHP? Sure, use it headless with GraphQL and Next.js or the provided out of the REST API. Today I won’t be using any of the […]