Skip to content

Instantly share code, notes, and snippets.

View Pierstoval's full-sized avatar
🌒

Alex Rock Pierstoval

🌒
View GitHub Profile

Friendly Domain Driven Design manifesto

(this is only my views, not a global thing, so if I'm wrong, maybe we are both either wrong or right for someone else anyway, so it's fine, don't need to make a fuss out of harmless opinions)

For experienced DDD architects: why?

I want more people to implement DDD, but in a more friendly way.

The notions between DDD and all others "good programming practices" are widely accessible nowadays, and some devs implement "pure DDD", or "pure hexagonal architecture" and so on.

// NOTE: the website must be in "English" to work.
// Reposts ("Posts" tab)
els = [...document.querySelectorAll('[data-testid="repostBtn"] svg')].filter(e => e?.style?.color?.match(179)).map(e => e.parentElement);
(async function () {
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
#!/bin/bash
pnpx sv create --template=minimal --types=ts --add sveltekit-adapter="adapter:static" --add mdsvex --install pnpm my-app
@Pierstoval
Pierstoval / Git_Rebase_Branches_Issue.md
Last active September 22, 2025 18:14
I've got a lot of issues when rebasing tons of branches...

Issue when rebasing lots of branches with conflicts

Working context

Let's imagine I have this git graph:

(fig 1)

* 9e5d9b3 - (HEAD -> branch10) Commit 10
* 3e0a94e - (branch9) Commit 9
@Pierstoval
Pierstoval / Debian_starter.md
Last active May 11, 2026 13:41
Small script to initiate a server, like from a Docker container, or a VPS

Debian Starter

This repo contains a script that installs some basic tools and packages on a fresh Debian installation.

How to use

Pre-requisites: sudo, curl or wget

This script is meant to be run on a fresh Debian installation (tested on 12-Bookworm and 13-Trixie)

@Pierstoval
Pierstoval / new_words.csv
Created March 10, 2025 13:07
Words to use instead of the ones the USA banned (incomplete list)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
activism attitude of changing things
activists people that want to change things
advocacy backing
advocate backer
advocates backs
barrier blocker
barriers blockers
biased partisan
biased toward partisan toward
biases incorrect views
<?php
namespace App\DataFixtures\Tools;
use Doctrine\Common\Collections\ArrayCollection;
trait GetObjectsFromData
{
abstract public static function getStaticData(): iterable;
<?php
class RawObjectMapper
{
public static function mapObjects(string $targetClassName, object $sourceObject): object
{
$sourceClass = \get_class($sourceObject);
$targetObject = (new \Doctrine\Instantiator\Instantiator())->instantiate($targetClassName);
$setter = \Closure::bind(static function (string $property, $value) use ($targetObject, $targetClassName): void {
curl --silent "https://symfony.com/doc/current/index.html?$(Get-Random -minimum 0)" | htmlq '.thanks strong:first-child' --text | sed -E 's/ +//g' | php -r "echo trim(file_get_contents('php://stdin'));"
@Pierstoval
Pierstoval / tauri_dev.mjs
Created February 11, 2022 22:00
A Node.js script to run both Node frontend & Rust backend when developing with Tauri
import {spawn} from "child_process";
const yarn_path = process.env.npm_execpath;
const node_path = process.env.npm_node_execpath;
const create_process = function(name, args) {
let child = spawn(node_path, [yarn_path, ...args], {stdio: 'inherit'});
child.on('close', (code) => console.log(`child process ${name} exited with code ${code}`));