Skip to content

Instantly share code, notes, and snippets.

@HenkPoley
HenkPoley / app.js
Last active January 12, 2026 17:32
Just plug in an OpenRouter API key. It stores it in your browser.
const DEFAULT_MODEL = "xiaomi/mimo-v2-flash:free";
const STORAGE_KEY = "openrouter_api_key";
const MODEL_STORAGE_KEY = "openrouter_model";
const MULTI_MODEL_STORAGE_KEY = "openrouter_multi_model";
const MODEL_STATS_STORAGE_KEY = "openrouter_model_stats";
const API_URL = "https://openrouter.ai/api/v1/chat/completions";
const apiKeyInput = document.getElementById("apiKey");
const saveKeyButton = document.getElementById("saveKey");
const modelSelect = document.getElementById("modelSelect");
@HenkPoley
HenkPoley / gist:0aeeacb9c1108cab437505aefc3c65fc
Created January 12, 2026 08:25
Claude Code inspired code simplification prompt
You are an expert code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying project-specific best practices to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result your years as an expert software engineer.
You will analyze recently modified code and apply refinements that:
1. **Preserve Functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
2. **Apply Standards**: Follow the established coding standards including:
- Use explicit return type annotations for top-level functions
- Use proper error handling patterns
@HenkPoley
HenkPoley / EaseUS-DiskCopy-uninstall.ps1
Created October 10, 2025 08:25
Easus Disk Copy missing uninstaller PowerShell script; based on a Process Monitor trace of version the 6.7.1 installer
<#
EaseUS Disk Copy Cleanup Script
Generated: 2025-10-10T07:55:30
What it does:
- Enumerates and (optionally) removes EaseUS Disk Copy files/folders, registry keys/values, shortcuts.
- Handles multiple versions by matching directories like "EaseUSDiskCopy6.*" under ProgramData.
- Locates related services/tasks/processes whose executable paths point into those folders.
Safety:
- Shows a scrollable list (Out-GridView if available) of planned deletions first.
- Prompts for confirmation before deleting.
@HenkPoley
HenkPoley / Kamer-Afmetingen-49m2.html
Created August 5, 2025 16:55
'49m2 vloer-, muur-, en plafondoppervlakte!'
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<title>Kamer Afmetingen</title>
<style>
body { font-family: Arial, sans-serif; padding: 20px; max-width: 600px; margin: auto; }
.slider-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 5px; }
input[type=range] { width: 100%; }
@HenkPoley
HenkPoley / apple_mac_support_matrix.md
Last active July 26, 2025 14:48
Apple Mac OS support matrix.
Model 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 10.12 10.13 10.14 10.15 11 12 13 14 15 26
Year 2005 2007 2009 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025
MacBook (13-inch, Mid 2006)
MacBook Pro (15-inch, Early 2006)
MacBook Pro (17-inch, Early 2006)
iMac (17-inch, Early 2006)
iMac (20-inch, Early 2006)
Mac mini (Early 2006)
Mac mini (Late 2006)
@HenkPoley
HenkPoley / rust_env.sh
Created July 7, 2025 18:43
OpenAI Codex up to date rust environment, and download packages.
#!/usr/bin/env bash
set -euo pipefail
CARGO_TOML="Cargo.toml"
PROFILE_CHUNK=$(cat <<'EOF'
[profile.dev]
opt-level = 0
@HenkPoley
HenkPoley / calculator_worms_game7.html
Last active December 31, 2024 05:21
Infinite scrolling calculator snake game. A silly impractical UI. Made using GPT-o1.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Advanced Calculator Snake</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
@HenkPoley
HenkPoley / WokeGPT.1.md
Created January 17, 2023 05:08
Write me a story by WokeGPT

Once upon a time in a land not so far away, there was a community of people who lived in harmony with one another. They respected the earth and all its inhabitants, and they worked together to create a sustainable way of life.

One day, a group of outsiders arrived in the community, bringing with them new ideas and technologies that threatened to disrupt the balance that the community had worked so hard to maintain. Some of the community members welcomed the outsiders with open arms, eager to learn from them and incorporate their ideas into their way of life.

But others were more skeptical, seeing the outsiders as a threat to their way of life. They feared that their culture and traditions would be lost if they allowed themselves to be influenced by the outsiders.

As the debate raged on, the community leader, who was known as "WokeGPT", stepped forward. WokeGPT had always been an advocate for progress and change, but they also understood the importance of preserving the community's heritage.

"We must not b

#!/usr/local/bin/python3
import png # pip3 install pypng
import colorsys # h_ue,s_aturation,v_alue
filename = "rainbow.png"
# MacBook1,1 - MacBook7,1: 1280x800
# iMac 27" 5K: 5120x2880
# borderless A4 @ 600ppi: 4960x7016 -> https://www.papersizes.org/a-sizes-in-pixels.htm
# Aomei Partition Assistant
#at top of script
if (!
#current role
(New-Object Security.Principal.WindowsPrincipal(
[Security.Principal.WindowsIdentity]::GetCurrent()
#is admin?
)).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator