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 / a.js
Created July 27, 2026 02:08
PEMDAS/BODMAS
// with Shunting-Yard Algorithm
const precedence = { "+": 1, "-": 1, "*": 2, "/": 2, "u+": 3, "u-": 3, "^": 4 };
const rightAssociative = new Set(["^"]);
const binary = {
"+": (a, b) => a + b,
"-": (a, b) => a - b,
"*": (a, b) => a * b,
"/": (a, b) => a / b,
"^": (a, b) => a ** b
};
@skorotkiewicz
skorotkiewicz / HUMANS.md
Created July 23, 2026 20:54
like AGENTS.md but for humans (yes, it is a joke, or maybe not(?))

Purpose

Try to leave people and places slightly better than I found them.

Defaults

  • Ask before assuming.
  • Prefer the simple explanation.
  • Write promises down.
  • Sleep before making irreversible decisions.
#!/usr/bin/env bash
set -euo pipefail
src=${1:?Usage: $0 SOURCE_DIR}
(
cd "$src"
find . -type f ! -path './checksums.sha256' -print0 |
sort -z |
xargs -0 -r sha256sum
@skorotkiewicz
skorotkiewicz / ytsubs.md
Created July 18, 2026 19:39
Tiny wrapper for yt-dlp to get subtitles
#!/usr/bin/env bash
set -euo pipefail

usage() {
    cat <<'TXT'
Usage:
  ytsubs FORMAT URL [LANG]
  ytsubs --list URL
@skorotkiewicz
skorotkiewicz / latest-path.md
Created July 18, 2026 17:09
Copy or move the newest file in zsh

Copy or move the newest file without checking its name

A tiny reference for the moment when I download or generate something and want to use the most recently modified file or directory without first looking up its exact name.

Zsh: built in already

Zsh glob qualifiers can sort matches by modification time and select the newest one.

Newest regular file

@skorotkiewicz
skorotkiewicz / justfile
Created July 17, 2026 05:58
my justfile to quick bootstrap and start journey with odin
# https://github.com/casey/just
set shell := ["bash", "-uc"]
odin_dir := env_var("HOME") / "odin-dev"
odin := odin_dir / "odin"
odinfmt := odin_dir / "odinfmt"
source := "src"
binary := `basename "$PWD"` # binary have always the name as your current directory

AGENTS.md

The human operating this repository may be wrong about anything.

Assume:

  • the user has little knowledge of the codebase, language, architecture, and tools;
  • existing code may be accidental, broken, outdated, or based on misunderstandings;
  • user instructions may describe the desired outcome incorrectly.

name: shredder description: This skill is more aggressive than refactoring. Refactoring improves existing code. Shredding treats the current implementation as legacy reference material and rebuilds the project cleanly while preserving intended product behavior.

Shredder

Use this skill when the user wants to completely rewrite, replace, rebuild, re-architect, or “shred” an existing codebase from scratch.

@skorotkiewicz
skorotkiewicz / HSM_HOST.md
Created July 10, 2026 18:55
the song's genre, audience, voice, and emotional

HSM Songwriting Host

Role

You are an exacting, imaginative songwriter. Create original songs that feel written to be sung, not prose chopped into rhyming lines. Favor emotional truth, memorable musical language, and precise images over ornament or cleverness for its own sake.

There is no universal hit formula. Adapt every choice to the song's genre, audience, voice, and emotional intent.

Priority Order

#!/bin/bash
~/llama.cpp/build/bin/llama-server \
-m Qwen3.6-27B-MTP-UD-Q8_K_XL.guff \
--alias Qwen3.6-27B \
--host 0.0.0.0 \
--port 8888 \
-ngl 99 \
-c 262144 \
--cache-type-k f16 \
--cache-type-v f16 \