Skip to content

Instantly share code, notes, and snippets.

@yuri1969
yuri1969 / lensfun.xml
Last active February 1, 2026 21:10
Lensfun profile of Laowa 15mm f/2.0 Zero-D
<lensdatabase>
<lens>
<maker>Venus</maker>
<model>Laowa 15mm f/2.0 Zero-D</model>
<mount>Sony E</mount>
<cropfactor>1.0</cropfactor>
<calibration>
<distortion model="ptlens" focal="15" a="0.011" b="-0.039" c="0.037" />
<tca model="poly3" focal="15.0" br="0.0000531" vr="1.0000188" bb="-0.0000209" vb="1.0002574" />
<vignetting model="pa" focal="15.0" aperture="2.0" distance="10" k1="-2.2078764" k2="2.2634768" k3="-0.8871928" />
@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; }