Skip to content

Instantly share code, notes, and snippets.

View thombles's full-sized avatar

Thomas Karpiniec thombles

View GitHub Profile
@thombles
thombles / prompt.md
Created August 5, 2026 05:02
Prompt to create a Polish drills app

Please turn this into a macOS app to help me learn Polish. Lay it out nicely but stick to standard Mac UI elements. The first window should be a menu of available exercises. Today there should be just one exercise, cardinal numbers. There should be a field to choose the number of sentences I want to drill (default 20) and a button to start. This then loads a second window where it has several elements

  • a random prompt e.g. "There are 501 apples"
  • a hint for the noun in base form e.g. "jabłko"
  • a focused textfield where I am expected to type the answer in written out form case-insensitive and press enter, e.g. "są pięćset jeden jabłek" (or whatever the correct answer is)
  • progress indicator and cancel button

When I press enter it should either briefly flash correct then move to the next question, or flash incorrect, clear the textfield, and show the correct answer for 2 seconds which I have to retype. After completing all questions it should show me a scoring screen where it shows me how long I spent in

@thombles
thombles / fix-jetson-ota.sh
Created July 31, 2026 04:52
Reliably upgrade a Jetson on WendyOS 0.16.1/0.17.0 up to 0.18.1
#!/usr/bin/env bash
#
# fix-jetson-ota.sh — move a Jetson (Thor / AGX Orin) from WendyOS
# 0.16.1 or 0.17.0 onto 0.18.1, preserving enrolment.
#
# Two routes, chosen automatically:
#
# SWITCH — the inactive slot already holds >= 0.18.1 (any device that has
# already tried and failed an OTA). Re-point with plain
# `nvbootctrl set-active-boot-slot` and reboot.
@thombles
thombles / main.rs
Created September 1, 2017 09:06
Sample Rust ARP Server
// Thomas Karpiniec, 1 Sep 2017
// Companion code to https://karp.id.au/a/2017/09/01/layer-2-raw-sockets-on-rustlinux/
extern crate libc;
use std::io;
use std::ptr;
use std::mem;
use std::collections::HashMap;
use std::net::Ipv4Addr;