Skip to content

Instantly share code, notes, and snippets.

View mxr576's full-sized avatar

Dezső BICZÓ mxr576

View GitHub Profile

I fucking hate reviewing AI-generated bullshit.

Reviewing code was never my favorite activity. It's slow, it's painstaking, it's cognitively taxing. It's pretty much a given that reading code is always slower, and less fun, than writing it.

So why would I ever do it? Because it's a collaborative process. I read your code, then ask questions and offer suggestions. We talk about them, we implement some things and not others. Together, we find our way and sculpt a patch we like. It's sociable, it's gratifying, and we get to share the satisfaction of co-creation. And it's based (ideally) on trust and respect: you did this work, and I would like to help you make it as good as it can be. Your success becomes my success.

If you're a person, that is.

If I have to review AI-generated code, or AI-generated writing for that matter, all of this flies out the window. I don't feel like a co-creator; I feel like I have to clean up a bag of dogshit left at my door. Anything good about the review process evaporate

@phenaproxima
phenaproxima / config-files-vs-actions.md
Last active January 28, 2026 10:30
A quick explainer about when to use config files in recipes, vs. config actions.

Recipe Dojo: config files vs. config actions

Recipes have two ways to affect site configuration:

  1. They can have a config directory containing YAML files, like you'd find in a config/install directory or config export.
  2. They can use config actions in their recipe.yml.

These techniques have different purposes and generally aren't interchangeable, but it's not always obvious which one to use. Well, I'm going to compare and contrast them, hopefully giving you a few rules of thumb.

Let's start with this:

<?php
/**
* @file
* Dumping ground for stubs, until a pattern emerges.
*/
declare(strict_types=1);
namespace Drupal\datetime\Plugin\Field\FieldType {
@ruudk
ruudk / README.md
Created December 8, 2022 15:35
How to find the files that are the slowest to analyze with PHPStan?

How to find the files that are the slowest to analyze with PHPStan?

For us, PHPStan became a bit slower with every release. We have a very large codebase with 10.000+ classes. There seem to be a few known issues related to big arrays.

See: phpstan/phpstan#8353 phpstan/phpstan#8146

To understand which files are problematic we run the following command:

@mglaman
mglaman / drush-loop.php
Created July 7, 2019 02:28
ReactPHP Drupal Tasks
<?php declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
function run_command(string $command): void {
$loop = React\EventLoop\Factory::create();
$process = new React\ChildProcess\Process($command);
$process->start($loop);
$process->on('exit', function ($exitCode) use ($command) {
// Trigger alerts that the command finished.
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active July 30, 2024 11:28
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active January 27, 2026 20:25
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'