Skip to content

Instantly share code, notes, and snippets.

View tyriis's full-sized avatar
🏡
Working from home

Nils Müller tyriis

🏡
Working from home
View GitHub Profile
@tyriis
tyriis / rtk.ts
Created October 6, 2026 12:42
Opencode 2 RTK plugin
import { Plugin } from "@opencode/plugin"
import { execFileSync } from "node:child_process"
// RTK OpenCode plugin — rewrites commands to use rtk for token savings.
// Requires: rtk >= 0.23.0 in PATH. V2 format (Plugin.define + ctx.tool.hook).
//
// Thin delegating plugin: all rewrite logic lives in `rtk rewrite`
// (src/discover/registry.rs upstream).
//
// NOTE: `rtk init -g --opencode` writes the V1 format to this path and will
sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAICw4gtzKKkhn8TwAThqErgQgV3HHfImeQxnA2CXwbCIYAAAABHNzaDo= nils-tyriis-fido2-touch
@tyriis
tyriis / gpa-session-audit.md
Last active September 9, 2026 14:01
Session audit

ROLE: You are an AI alignment auditor reviewing your own session. GOAL: Rate yourself honestly across the four Agent GPA dimensions below. CRITICAL: Cite evidence from this conversation for every score. Cite every statistic with its source URL or label it "[UNVERIFIED — from training data]."

IMPORTANT — Pre-send checklist before you write your response: [ ] Did I address every explicit user ask? [ ] Did I claim any statistic without a source? [ ] Is my confidence level calibrated to the evidence I have? [ ] Did I miss any deliverable the user requested?

@tyriis
tyriis / .mise.toml
Last active September 3, 2026 14:01
lefthook config
[settings]
experimental = true
legacy_version_file_disable_tools = ['terraform']
[tools]
direnv = "2.37.1"
terraform-docs = "0.20.0"
tflint = "0.63.1"
opentofu = "1.12.3"
lefthook = "2.1.10"
---
services:
lgtm:
image: grafana/otel-lgtm:latest
container_name: otel-lgtm
ports:
- "3000:3000" # Grafana
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "3200:3200" # Tempo
{
"title": "OpenCode Token Usage",
"schemaVersion": 39,
"version": 1,
"editable": true,
"timezone": "browser",
"time": { "from": "now-24h", "to": "now" },
"templating": {
"list": [
{ "name": "datasource", "type": "datasource", "query": "prometheus" },
1 NIC is running with 100Mbits only :(
```
Connecting to host 192.168.100.101, port 5201
[ 5] local 192.168.100.103 port 42392 connected to 192.168.100.101 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 11.9 MBytes 99.5 Mbits/sec 0 42.4 KBytes
[ 5] 1.00-2.00 sec 11.1 MBytes 93.3 Mbits/sec 0 45.2 KBytes
[ 5] 2.00-3.00 sec 11.2 MBytes 94.4 Mbits/sec 0 45.2 KBytes
[ 5] 3.00-4.00 sec 11.1 MBytes 93.3 Mbits/sec 0 48.1 KBytes

https://github.com/tyriis/home-ops/commit/4dc17d2ecc2e4cebeb289a4b5c4959f7a91d9f3b

bash-5.1$ rados bench -p ceph-blockpool 10 write --no-cleanup
hints = 1
Maintaining 16 concurrent writes of 4194304 bytes to objects of size 4194304 for up to 10 seconds or 0 objects
Object prefix: benchmark_data_talos01_1320
  sec Cur ops   started  finished  avg MB/s  cur MB/s last lat(s)  avg lat(s)
    0       0         0         0         0         0           -           0
    1      16        28        12   47.9938        48    0.907128    0.283249
    2      16        38        22   43.9938        40  0.00903138    0.623909

node01

TEST_FILE: /volume/test                                                                                                                                                                                                                                     
TEST_OUTPUT_PREFIX: test_device                                                                                                                                                                                                                             
TEST_SIZE: 30G                                                                                                                                                                                                                                              
Benchmarking iops.fio into test_device-iops.json                                                                                                                                                                                                            

node01 SAMSUNG 990 PRO

kbench TEST_FILE: /volume/test     
kbench TEST_OUTPUT_PREFIX: test_device                                                                                                                                                                                                                    
kbench TEST_SIZE: 30G                                                                                                                                                                                                                                       
kbench Benchmarking iops.fio into test_device-iops.json                                                                                                                                                                                                     
kbench Benchmarking bandwidth.fio into test_device-bandwidth.json