Skip to content

Instantly share code, notes, and snippets.

@villeodell
villeodell / clean-filenames.sh
Last active October 26, 2022 10:53
Clean filenames for OneDrive or FAT32
#!/bin/zsh
#------------------------------------------------------------------
# Strip illegal characters :;*?\"<>| recursively beginning in
# the directory it is run from.
#
# Use when preparing to sync or copy files to a filesystem
# that does not allow these characters. (MS OneDrive, fat32, etc..)
#
# zmv [OPTIONS] oldpattern newpattern
@villeodell
villeodell / coda-api-swagger2.yaml
Created November 11, 2023 14:23
Coda API (coda.io) Swagger 2 definition for services that don't yet support OpenAPI 3.0 and later
---
swagger: "2.0"
info:
version: 1.4.3
title: Coda API
description: |
# Introduction
The Coda API is a RESTful API that lets you programmatically interact with Coda docs:
**PROMPT FOR LLM (copy+paste below, then append your plan)**
You are converting a **generic plan of action** into a **production-ready research/engineering `todo.md`** that is directly executable by a capable coding agent. Your output must be a single Markdown document with a fenced **XML `<workflows>`** block. Do **not** include any extra commentary, explanations, or chat—**output only the document**.
### Transformation requirements
* Be **specific** and **operational**. Replace vague goals with concrete steps, commands, checklists, acceptance gates, and explicit assumptions.
* Prefer **compact, high-signal prose**. No filler. Use short paragraphs and terse bullets.
* If information is missing, make **minimal, clearly labeled assumptions** (e.g., “Assumption: …”). Do **not** ask questions.
* Compile the spec into **executable oracles**: pre/postconditions, invariants, consumer/provider API contracts, and **metamorphic properties**. Generate both tests and **runtime guards**.
@villeodell
villeodell / bm.txt
Last active November 29, 2025 13:40
Yt audio
javascript:(function(){var p=document.querySelector('#movie_player');if(!p){alert('No player');return;}var t=p.getAvailableAudioTracks();if(!t||!t.length){alert('No tracks available');return;}alert('Tracks: '+t.map(x=>x.getLanguageInfo().name).join(', '));})();