Skip to content

Instantly share code, notes, and snippets.

View skorotkiewicz's full-sized avatar
💻
\coding/

Sebastian Korotkiewicz skorotkiewicz

💻
\coding/
View GitHub Profile
@skorotkiewicz
skorotkiewicz / jsonc.py
Created December 6, 2025 06:44
The tool stores comments in a .jsonc file and maintains clean JSON in the original file.
#!/usr/bin/env python3
"""
JSON with Comments editor - Edit JSON files with comments
Usage:
./jsonc <file> - Edit JSON with comments in your editor
cat <file> - View clean JSON without comments
The tool stores comments in a .jsonc file and maintains clean JSON in the original file.
"""
@skorotkiewicz
skorotkiewicz / play_random_movie_by_year.sh
Created December 4, 2025 14:03
Play random movies by year with mpv
#!/bin/bash
## Play one random movie from before 2008
#./play_random_movie_by_year.sh 2008
## Play ALL movies from before 2008 in random order
#./play_random_movie_by_year.sh 2008 --playlist=true
# Default configuration
MOVIE_DIR="HD"
@skorotkiewicz
skorotkiewicz / IOFMS.md
Created October 24, 2025 07:40
International Ocean Forensic Monitoring System (IOFMS)

International Ocean Forensic Monitoring System (IOFMS)

A Global Initiative for Justice, Science, and Ocean Security

White Paper - Draft v1.0
Date: October 2025
Status: Concept Proposal


Executive Summary

@skorotkiewicz
skorotkiewicz / lingua.md
Last active October 11, 2025 12:57
Propozycja Wprowadzenia Słowa "Lingua" do Polskiej Lingui

Streszczenie

Niniejszy dokument proponuje wprowadzenie nowego słowa "lingua" do polskiej lingui jako alternatywy dla dwuznacznego słowa "język". Zmiana ta ma na celu uporządkowanie terminologii i zwiększenie precyzji komunikacji w kontekście systemów lingualnych.


1. Problem: Dwuznaczność słowa "język"

W polskiej lingui słowo "język" posiada dwa fundamentalnie różne znaczenia:

@skorotkiewicz
skorotkiewicz / openwrt_relayd_repeater.md
Last active October 3, 2025 03:48 — forked from matasarei/openwrt_relayd_repeater.md
HOWTO: Setup OpenWRT (LEDE) WiFi repeater (the right way)

HOWTO: Setup OpenWRT (LEDE) WiFi repeater with IPv6 Support

1. Installation (Beginning of the guide)

Add after the relayd installation:

opkg install relayd odhcp6c
/etc/init.d/relayd enable
/etc/init.d/odhcp6c enable
@skorotkiewicz
skorotkiewicz / mfcc.ts
Created September 28, 2025 06:32
MFCC TS/JS
import FFT from "fft.js";
function hzToMel(hz: number): number {
return 2595 * Math.log10(1 + hz / 700);
}
function melToHz(mel: number): number {
return 700 * (Math.pow(10, mel / 2595) - 1);
}
@skorotkiewicz
skorotkiewicz / yayc.sh
Created September 4, 2025 06:33
Build AUR packages in container (systemd-nspawn) and then install on host (Arch Linux)
#!/usr/bin/env bash
set -euo pipefail
# chmod +x /usr/local/bin/yayc
# Config
CONTAINER_NAME="aur-builder"
CONTAINER_DIR="/var/lib/machines/$CONTAINER_NAME"
PKG_OUT="/var/cache/aur-builder" # here are .zst packages
HOST_USER="$(id -un)"
const AppAiTest = () => {
const generateAI = async (prompt) => {
const res = await fetch("http://localhost:11434/api/generate", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gemma3:latest",
prompt: prompt,
@skorotkiewicz
skorotkiewicz / prepare-commit-msg
Created August 26, 2025 05:03
Commit git with Ollama
#!/usr/bin/env sh
# Make this file executable: chmod +x .git/hooks/prepare-commit-msg
echo "Running prepare-commit-msg hook"
COMMIT_MSG_FILE="$1"
# Get the staged diff
DIFF=$(git diff --cached)
# Generate a summary with ollama CLI and gemma3 model
@skorotkiewicz
skorotkiewicz / ping.sh
Last active June 3, 2025 06:44
my tint2 executors
ping -c 1 ipv4.google.com | grep -oP 'time=\K[0-9.]+ ms'