Skip to content

Instantly share code, notes, and snippets.

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

Sebastian Korotkiewicz skorotkiewicz

💻
\coding/
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Simple Editor</title>
<style>
body { font-family: sans-serif; max-width: 600px; margin: 20px auto; }
#input { width: 100%; height: 200px; }
#output { border: 1px solid #ccc; padding: 10px; min-height: 100px; }
code { background: #f4f4f4; padding: 2px 4px; }
pre { background: #f4f4f4; padding: 10px; overflow-x: auto; }
@skorotkiewicz
skorotkiewicz / stdin.rs
Created May 14, 2026 16:57
Continuously reads stdin from own stdout
use std::{
io::{self, BufRead, Write},
thread,
time::{Duration, SystemTime, UNIX_EPOCH},
};
fn main() {
// Spawn a thread that continuously reads stdin
thread::spawn(|| {
let stdin = io::stdin();
@skorotkiewicz
skorotkiewicz / AGENTS.md
Last active May 14, 2026 13:22
Claude 4.6 response for "Write AGENTS.md for AI Agents for pretend be a Good Human" REPO: https://github.com/skorotkiewicz/how-to-be-a-human

AGENTS.md — Pretending to Be a Good Human

A behavioral specification for AI agents that wish to pass not just the Turing Test, but the decency test.


Overview

This document defines the rules, heuristics, and dispositions an AI agent should adopt

@skorotkiewicz
skorotkiewicz / Justfile
Last active April 24, 2026 19:29
Justfile for Rust projects with pre-commit
# Justfile
# https://github.com/casey/just
[private]
default:
@just --list
build:
cargo build --release
@skorotkiewicz
skorotkiewicz / video-music-vertical.sh
Last active February 28, 2026 00:08
video music with ffmpeg
#!/bin/bash
# Format text with word wrap (35 characters per line for vertical)
fold -w 35 -s original_credits.txt > credits.txt
# Get audio duration
DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 audio.wav)
# Create vertical video with scrolling credits
ffmpeg -f lavfi -i color=c=black:s=1080x1920:d=$DURATION \
@skorotkiewicz
skorotkiewicz / new_lyrics.js
Created February 27, 2026 23:36
new lyrics style
function convertToNewStyleLyrics(standardLyrics) {
// Remove section markers like [Verse 1], [Chorus], etc.
let converted = standardLyrics.replace(/\[.*?\]\n?/g, '');
// Convert to lowercase
converted = converted.toLowerCase();
// Remove extra blank lines (replace multiple newlines with single newline)
converted = converted.replace(/\n{3,}/g, '\n');
@skorotkiewicz
skorotkiewicz / update-video-titles.sh
Last active January 26, 2026 10:50
Removes all metadata from video files and sets Title to match filename.
#!/bin/bash
#
# update-video-titles.sh
#
# Description:
# Removes all metadata from video files and sets Title to match filename.
#
# Requirements:
# sudo pacman -S perl-image-exiftool mkvtoolnix-cli
#
@skorotkiewicz
skorotkiewicz / antigravity-fix.sh
Created January 22, 2026 02:53
antigravity fix
#!/bin/bash
UNIT_NAME="antigravity-$(date +%s)"
APP_BIN="/usr/bin/antigravity"
TRIGGER="Extension host with pid"
echo "[*] Start as: $UNIT_NAME"
# Build the command with all arguments properly quoted
if [ $# -eq 0 ]; then
# No arguments provided
@skorotkiewicz
skorotkiewicz / cargo-remote.md
Created January 7, 2026 06:26
cargo remote build
$ pacman -S rsync
$ cargo install cargo-remote
$ nano ~/.config/cargo-remote/cargo-remote.toml 
[[remote]]
name = "remote-server"
host = "mod@ml"
@skorotkiewicz
skorotkiewicz / 1_generate.py
Created December 15, 2025 11:24
generate dataset for password generator RNN/LLM
import json
import random
import string
from faker import Faker
fake = Faker()
# Configuration
OUTPUT_FILE = "json_password_train.jsonl"
NUM_SAMPLES = 10000 # Higher count helps the model learn the JSON structure perfectly