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 / 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"
@skorotkiewicz
skorotkiewicz / rust_update.txt
Last active August 27, 2026 20:19
rust update log
rustc --version
rustup update stable
$ rustc --version
rustc 1.93.1 (01f6ddf75 2026-02-11)
$ rustup update stable
info: syncing channel updates for stable-x86_64-unknown-linux-gnu
info: latest update on 2026-08-20 for version 1.98.0 (88d9e12ae 2026-08-18)
info: removing previous version of component rust-std for target wasm32-wasip1
@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