RSSAmplifier

Blog

Blog by Dominik Chrástecký

Blog about anything and everything by Dominik Chrástecký

chrastecky.devRSS feed ↗22 posts

Latest posts

ActivityPub: The Good, the Bad and the Ugly

ActivityPub is the best protocol available for interoperable federated social media—primarily because no other current federated protocols target social media, offer interoperability, and aren't deprecated.

Making Your Angular App SEO-Friendly with SSR

Unless you’ve been living under a rock, you’ve probably noticed that Angular has supported server-side rendering (SSR) for quite a while now. Let’s look at what it can actually do for SEO!

Writing Your Own Framework in PHP: Part One

A hands-on intro to building your own PHP framework entirely from scratch — handwritten, with minimal dependencies.

Persistent packages on Steam Deck using Nix

The Steam Deck (and SteamOS) delivers a fantastic console-like experience on a Linux system. However, its immutable filesystem means that installing packages that persist across system upgrades isn’t straightforward. Fortunately, with a little Nix magic, you can work around that limitation.

Fun with PHP: Changing Readonly Properties and Other Shenanigans

Did you know that PHP’s userland lets you change a readonly property multiple times? Or that you can modify an enum’s value? Or even change internal object properties that should never be changed? Let me show you some truly cursed PHP tricks.

New in PHP 8.5: Small Features, Big Impact

The smaller features in PHP 8.5 that may not make headlines but definitely deserve a mention.

Lazy objects in PHP 8.4

Lazy objects are a fantastic addition to the already impressive PHP 8.4 release. In this article, we'll explore how to use them.

New in PHP 8.5: Closures as Constant Expressions

Another exciting PHP 8.5 feature: Closures can now be used as constant expressions, allowing them to appear as default parameters or attribute values.

New in PHP 8.5: The Pipe Operator

One of the most exciting additions in PHP 8.5 is the pipe operator. It enables more readable and expressive code when working with nested function calls.

Go Meets PHP: Enhancing Your PHP Applications with Go via FFI

Use PHP’s FFI to supercharge your application by offloading compute-heavy work to Go!

New in PHP 8.5: Asymmetric Visibility for Static Properties

A small but meaningful update in PHP 8.5 introduces asymmetric visibility for static properties.

New in PHP 8.5: Levenshtein Comparison for UTF-8 Strings

PHP 8.5 adds a new function for calculating the Levenshtein distance between strings — now with proper UTF-8 support.

New in PHP 8.5: Final Promoted Properties

PHP 8.5 adds support for final properties using constructor promotion. In this (very short) article, I’ll show you everything you need to know about this new addition.

Creating a Simple Encrypted Matrix Bot in Go

Creating a basic Matrix bot is straightforward—generate an access token, send an HTTP request, and you're done. But posting messages to an encrypted room with verified sessions is a bit more involved. This guide will walk you step-by-step through creating your own encrypted Matrix bot using Golang.

New in PHP 8.5: Attributes on Constants

PHP 8.5 introduces support for attributes on non-class constants. This article walks you through everything you need to know about this new feature!

New in PHP 8.5: Marking Return Values as Important

Today, we'll explore one of the exciting features coming with PHP 8.5—the new #[NoDiscard] attribute to indicate important return values.

OpenSCAD configurable calendar 3D model

I love creating configurable generic models using OpenSCAD, and this is the most complex one I've created to date—an easy-to-configure calendar using some clever algorithms to render correctly.

Static Typing for the AWS SDK for PHP

If you’ve ever worked with both PHPStan and the official AWS SDK for PHP, you know they don’t get along particularly well. In this article, I’ll show you a package I created that addresses this exact issue.

Doctrine and SQLite migrations: How to disable foreign keys in PHP 8.4

SQLite has limited capabilities for modifying tables—often, you must drop the original table and recreate it, which can break your foreign keys. PHP 8.4 provides a cool solution for that.

Transpiling PHP for older versions

Transpiling lets you write your package or application using the latest PHP features—even if your runtime is older. This is especially useful for libraries (where you can’t just bump the PHP version without inconveniencing your users) and can be a lifesaver when upgrading legacy apps.

Unleash: Feature flags in PHP

Feature flags (also known as feature toggles) let you enable or disable specific features or code paths at runtime without deploying new code. In this article, we'll explore Unleash, my favourite open-source tool for managing feature flags efficiently.

Strongly typed ng-template in Angular

If you're like me and feel uneasy whenever something is typed as 'any' in TypeScript, this article is for you! I'll show you a neat trick to help both the compiler and your IDE understand the exact type of data being passed to your ng-template.