Skip to content

Instantly share code, notes, and snippets.

Why don't you run tests after each change?

Bash Run persistence tests

All 9 pass. You're right — I should run the tests after every change, not just at the end. I'll do that going forward.

  • Write feedback_run_tests.md 12 lines
  • Write MEMORY.md
@yuri1969
yuri1969 / eclipse-edc.md
Last active January 22, 2026 09:41
Eclipse EDC SQL spam

PgSQL - 12 queries/sec - Tractus-X EDC 0.10.1

SELECT * FROM edc_contract_negotiation LEFT JOIN edc_contract_agreement agr ON edc_contract_negotiation.agreement_id = agr.agr_id WHERE state = $1 AND pending = $2 AND type = $3 AND (lease_id IS NULL OR lease_id IN (SELECT lease_id FROM edc_lease WHERE ($4 > (leased_at + lease_duration)))) ORDER BY state_timestamp ASC LIMIT $5 OFFSET $6
  • edc.negotiation.consumer.state-machine.iteration-wait-millis
  • edc.negotiation.consumer.state-machine.batch-size
  • edc.negotiation.consumer.send.retry.limit
  • edc.negotiation.consumer.send.retry.base-delay.ms
@yuri1969
yuri1969 / enum_argparse.py
Created March 30, 2025 20:28
enum argparse
#!/usr/bin/env python3
'''Enum argparse'''
import argparse
import enum
from dataclasses import dataclass
@dataclass

grep -ir "python3_{10..11}" /var/db/repos/gentoo/* | wc -l

@yuri1969
yuri1969 / etc portage make.conf
Last active January 19, 2026 19:06
Gentoo Portage make.conf - ThinkPad T480
###################################################
#
# ThinkPad T480
#
# i7-8550U, 9th Gen Intel GFX, SSD WD NS720 512G
#
###################################################
# Prefer stability over agressive optimizations
# Use '-march=native' since working fine; check: 'echo | gcc -### -E - -march=native'
@yuri1969
yuri1969 / kafka.sh
Last active November 30, 2023 15:55
cheat
echo 'security.protocol=SSL' > ~/kafka-client.properties
export KAFKA_HEAP_OPTS='-Xmx2g'
# ./bin/kafka-consumer-groups.sh --bootstrap-server <host:port> --timeout 15000 --command-config kafka-client.properties --group '<consumer_group_name>' --topic '<topic>:<partition>' --reset-offsets --to-offset <offset> --dry-run
./bin/kafka-consumer-groups.sh --bootstrap-server '...amazonaws.com:9094' --timeout 15000 --command-config ~/kafka-client.properties --group 'kestra_executor_main' --topic 'kestra_execution:7' --reset-offsets --to-offset 8915 --dry-run
# append '--execute' to commit
https://dofsimulator.net/en/?x=EQaAyQEGgAAMIkwkAAADgAA
@yuri1969
yuri1969 / kcat.md
Last active September 26, 2023 20:36
kcat / kafkacat

Kcat

Installation

  • dnf install -y kcat
  • apt-get install kafkacat

Usage

Print broker info:

@yuri1969
yuri1969 / xkcd.md
Last active September 19, 2023 14:01
XKCD list
@yuri1969
yuri1969 / run_kernel_compile.sh
Last active June 2, 2023 20:37
Run kernel compile
#!/bin/bash
cd /usr/src/linux || { echo 'Failed to switch to /usr/src/linux' >&2; exit 1; }
chrt -i 0 ionice -c 3 make -j "$(nproc)" || \
{ echo 'Failed to compile the kernel' >&2; exit 1; }