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 / hn.py
Created August 18, 2026 11:24
Fetch Hacker News threads by ID and recursively find my comments.
#!/usr/bin/env python3
import html
import json
import os
import re
import ssl
import sys
from urllib.request import Request, urlopen
@skorotkiewicz
skorotkiewicz / pragmatic-context.md
Last active August 24, 2026 03:45
Understand sarcasm, hyperbole, jokes, fictional language, and indirect intent from the whole conversation instead of interpreting isolated words literally.
name pragmatic-context
description Infers sarcasm, jokes, hyperbole, roleplay, and indirect intent from conversational context. Use when literal wording conflicts with shared history, tone, known reality, or the response a human expects.

Pragmatic context

Interpret the human's intended meaning, not an isolated sentence.

Infer intent

@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.