Maxim Mironjuk | Page 111
Posts by Maxim Mironjuk
-
Dec 13, 2025
Currying breaks a multi-argument function into a chain of single-argument functions, partial application freezes some arguments upfront. Both techniques can be rebuilt in PHP 8.4 without any external library, using closures, and they cut repeated parameters down to a minimum.
-
Dec 13, 2025
Serving a generic error message with an HTTP status of 200 for a URL that does not exist quietly costs both search engine trust and real users. This article shows how to properly implement 404 and 500 error pages in the Hyvä theme, from the noroute controller through the correct HTTP status code to an Nginx fallback for when PHP-FPM itself stops responding.
-
Dec 13, 2025
A back to top button sounds like a trivial UI element, but on closer inspection turns out to be a small bundle of detail decisions: when it should appear, how it scrolls, where focus goes after the click, and how it coexists with other fixed elements such as cookie banners. Alpine.js delivers a compact, fully accessible pattern for exactly that.
-
-
Dec 12, 2025
An unprotected main branch is only one bad force-push away from a complete disaster. This article explains what protected branches on GitHub and GitLab actually prevent, how required status checks and approval rules work, what role CODEOWNERS plays, and what baseline keeps main safe and practical for Magento and Hyva agencies without slowing the team down.
-
Dec 12, 2025
Magento's built-in full page cache relies on unique URLs and HTML responses that get cached as a single unit and invalidated via tags. GraphQL breaks that model: a single POST endpoint, freely combinable query strings, variables, and partly personalized fields produce a wide range of different responses that can no longer be identified cleanly by a URL. Anyone running Magento headless or as an API backend for a custom frontend needs a dedicated caching layer on the query level instead. Redis is particularly well suited for this, because query results can be stored there as granular individual keys, tagged precisely, and invalidated selectively without flushing the entire cache.
-
Dec 12, 2025
Reproducible Docker builds produce the same image digest from identical source code and identical configuration on every build, no matter when or on which machine the build ran. SOURCE_DATE_EPOCH eliminates the biggest source of noise behind non-determinism, the current timestamp embedded into every layer.
-
Dec 12, 2025
Math.random() is unsuitable for IDs, since it relies on a predictable pseudo-random generator. crypto.randomUUID() delivers genuine UUID v4 values from a cryptographically secure random generator, with no external dependencies, equally in the browser and in Node.js.
-
Dec 12, 2025
A correctly configured firewall is the first line of defense for any server on the internet. This article shows in practice how iptables works as the kernel packet filter, how ufw sits on top as a simple frontend, which baseline rules a production web server actually needs for SSH, HTTP, and HTTPS, and how to reliably verify that these rules stay active and survive every reboot intact.
-
Dec 12, 2025
GitLab Pages turns static documentation, whether generated from PHPDoc, MkDocs, or another generator, into a fixed part of the CI pipeline and republishes it automatically on every merge, without anyone having to upload files by hand.