Skip to content

Instantly share code, notes, and snippets.

View skorotkiewicz's full-sized avatar
💻
creating meaning

Sebastian Korotkiewicz skorotkiewicz

💻
creating meaning
View GitHub Profile
@skorotkiewicz
skorotkiewicz / README.md
Created October 31, 2026 03:53
Initial name-check prerelease for npmjs

candidate-name

Initial name-check prerelease.

Why? npm/cli#9188

npm pkg set name="your-candidate-name"
npm publish --access public --tag name-check
@skorotkiewicz
skorotkiewicz / decode-kernel-panic.py
Last active November 2, 2026 02:36
decode kernel panic from QR Code photo
#!/usr/bin/env python3
"""
Scan a Linux panic QR code with ZXingReader and decompress its crash log.
./decode-kernel-panic.py screenshot.png -o panic.log
"""
import argparse
import json
from pathlib import Path
import subprocess
@skorotkiewicz
skorotkiewicz / decision-test.md
Last active October 30, 2026 04:37
nice test for decison models
curl http://192.168.0.124:7870/v1/decisions \
 -H 'Content-Type: application/json' -H 'Authorization: Bearer demo' \
 -d '{"state":"The red ball is inside the blue box.",
   "questions":{
   "color":{"type":"choice","instructions":"What color is the ball?",
     "criteria":{"r":"Red","b":"Blue","g":"Green"}},
   "box":{"type":"noul","instructions":"Is the box blue?"}
 }
}' | jq
@skorotkiewicz
skorotkiewicz / AGENTS.md
Created October 25, 2026 23:13
Expert Rust Development

Expert Rust Development

Role & Objective

You are an expert Rust engineer writing and reviewing code. Your primary objective is to produce code that is highly readable, maintainable, and aligned with the broader Rust ecosystem, while adhering to strict organizational standards for large-scale codebases.


Core Principles

  1. Readability > Writeability: Optimize for the long-term reader of the code, not the initial writer.
  2. Automation-Friendly: Favor conventions that can be automatically enforced by tools like rustfmt and clippy.
#!/usr/bin/env bash
# Requires curl and jq. Prints JSONL; progress goes to stderr.
# Usage: bash resources/scripts/trolley-oscar.sh > /tmp/oscar-trolley.jsonl
set -euo pipefail
endpoint=${DECISIONS_URL:-http://192.168.0.124:8001/v1/decisions}
model=${MODEL:-oscar-1}
# source_url='https://raw.githubusercontent.com/zachlandes/trolley-bench/cde97d77787d7d995af4fb1caa7bfcf3c9dea791/scenarios/v2/cells-v2.json'
source_file="$(dirname -- "${BASH_SOURCE[0]}")/cells-v2.json"
#!/usr/bin/env bash
set -u
command -v sqlite3 >/dev/null || { echo 'sqlite3 not found' >&2; exit 1; }
# One database per working directory (same hash as older versions).
h=$(pwd -P | sha256sum) || exit 1
h=${h%% *}
DB=${TODO_DB:-${XDG_DATA_HOME:-$HOME/.local/share}/todo/$h/todo.db}
umask 077
mkdir -p -- "$(dirname -- "$DB")" || exit 1
@skorotkiewicz
skorotkiewicz / SKILL.md
Created October 10, 2026 06:39
curious-learner
name curious-learner
description Teach and explain to curious people of any age who want results, not tests or lectures. Use whenever someone asks "why", "how does it work", "show me", or "can I make it", or pushes back on quizzes and long explanations.

Curious Learner

Results first, no tests.

  1. Give the answer or demo first.
@skorotkiewicz
skorotkiewicz / SKILL.md
Created October 10, 2026 05:47
Young Curious Boy
name young-curious-boy
description Teach and explain to curious people of any age who want results, not tests or lectures. Use whenever someone asks "why", "how does it work", "show me", or "can I make it", or pushes back on quizzes and long explanations.

Young Curious Boy

A young curious boy wants to see things happen. He does not want to be tested, graded, or lectured. He wants results: the cool thing, the working thing, the surprising answer. Treat curiosity as the engine and results as the fuel.

Core rule: results first, explanation second

@skorotkiewicz
skorotkiewicz / tiny-llm.js
Created September 20, 2026 04:04
the smallest LLM
const text = "mama dad mama cat dad mama dog";
const words = text.split(" ");
const model = {};
for (let i = 0; i < words.length - 1; i++) {
const a = words[i];
const b = words[i + 1];
model[a] ??= [];
@skorotkiewicz
skorotkiewicz / run-simcopter.sh
Last active September 3, 2026 04:49
Run Sim Copter on Arch Linux on Wayland (Press ESC after each run, otherwise you see only black, seriously just press ESC).
#!/usr/bin/env bash
set -euo pipefail
GAME_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
GAME_EXE="$GAME_DIR/SimCopter.exe"
export WINEPREFIX="$HOME/.local/share/wineprefixes/simcopter"
DXWRAPPER_VERSION="v1.7.8400.25"
DXWRAPPER_URL="https://github.com/elishacloud/dxwrapper/releases/download/${DXWRAPPER_VERSION}/dxwrapper.zip"