Skip to content

Instantly share code, notes, and snippets.

View l1x's full-sized avatar
🏠
Working from home

Istvan l1x

🏠
Working from home
View GitHub Profile
@l1x
l1x / hello.md
Created April 8, 2026 18:12
Conversations with AI

❯ you mean you deleted it

⏺ You're right, that was me (Claude). The commit 7e1cebb0 deleted the old handler as part of the duplicate emails fix without verifying that DGW was already pointing to the new URL. That's a mistake — it should have been kept until the switchover was confirmed.

Do you know which URL DGW is currently configured to call? If it's still the old path, we need to either:

  1. Restore the old route as a redirect to the new one (safest, immediate fix)
  2. Or update the DGW dashboard to point to the new URL
Metric chronyd systemd-timesyncd Difference
PID 2561 344 -
RSS (Physical RAM) 1,188 KiB (~1.2 MB) 7,004 KiB (~6.8 MB) chronyd uses ~83% less RAM
VSZ (Virtual Memory) 8,956 KiB (~8.7 MB) 88,244 KiB (~86.1 MB) chronyd maps ~10x less memory
Command /usr/sbin/chronyd /usr/lib/systemd/systemd-timesyncd -

Alpine

sp = [
[1, 2, 3],
[8, 9, 4],
[7, 6, 5]
]
def rot90(m):
return list(zip(*m))[::-1]
@l1x
l1x / readme.md
Last active December 12, 2024 14:11
Spiral printing a matrix in Erlang

Spiral printing a matrix in Erlang

This Erlang module implements a function that returns the elements of a 2D matrix (list of lists) in a spiral order. The spiral order starts from the top-left corner and proceeds in a spiral pattern, moving right across the top row, down the right column, left across the bottom row, and up the left column, and continues until all elements are traversed.

Module Overview

-module(spiral).
@l1x
l1x / consumer.js
Last active December 11, 2024 13:37
Reading and writing from/to Kafka with ZSTD compressed messages from Javascript
const { Kafka, logLevel, Partitioners, CompressionTypes, CompressionCodecs } =
require("kafkajs");
const ZstdCodec = require("@kafkajs/zstd");
const compressionParams = { level: 1 };
const decompressionParams = {};
CompressionCodecs[CompressionTypes.ZSTD] = ZstdCodec(
compressionParams,
decompressionParams,
);
@l1x
l1x / get_all_objects.py
Created July 21, 2022 12:46
Getting all objects in a S3 bucket (based on a prefix)
def get_files(bucket: str, prefix: str):
max_files = 100000
files = []
truncated = True
continuation_token = None
try:
response = s3_client.list_objects_v2(
Két végéről égetem a gyertyám,
reggelig sem tart ki tán, tudom,
de addig ellenség s te édes jóbarát,
hullócsillag fényemnél vigasztalódj
@l1x
l1x / aws.apigateway.with.custom.domain.tf
Created April 10, 2022 17:08
Creating an AWS Apigateway HTTP API with custom domain
resource "aws_apigatewayv2_domain_name" "api-gw-domain-name" {
domain_name = var.domain-name
domain_name_configuration {
certificate_arn = var.acm-certificate-arn
endpoint_type = "REGIONAL"
security_policy = "TLS_1_2"
}
}
doas apt-get install bpfcc-tools linux-headers-(uname -r)

Creating a mirror using two disks

This uses the partition UUID to be able to tolarate device name changes.

 doas /sbin/mdadm \
 --verbose --create /dev/md/nas0 \
 --level=mirror --raid-devices=2 \
 /dev/disk/by-partuuid/7b139fcf-e971-4806-b0f9-cbbd8c1d24de \
 /dev/disk/by-partuuid/a11e2aa2-c404-48a1-8e3e-51a8dec0c967