Skip to content

Instantly share code, notes, and snippets.

@mindplay-dk
mindplay-dk / clean-google.txt
Last active August 26, 2025 16:35
"Clean Google" ad blocking content filter (for Brave, uBlock origin, etc.)
# Block everything in search results except actual results & videos:
www.google.com###search div>div[data-rpos]:not(:has([data-snf])):not(:has([data-vurl])):not(:has(h3>a.l)):not(:has([jscontroller]):has([data-maindata*="currency"]))
# AI overview:
www.google.com##[data-mcpr]
# Junk below search results:
www.google.com###bres
# Junk in right-hand column:
@mindplay-dk
mindplay-dk / tak-rules.md
Last active August 6, 2025 10:02
Concise Tak Rules

Tak Rules

1. Starting Play

1.1. Board Setup

  • The board must be square: standard sizes are 3×3, 4×4, 5×5, 6×6, 7x7, or 8×8.
  • The board starts empty.
  • Players each have a supply of stones and capstones based on board size:
@mindplay-dk
mindplay-dk / join.sh
Created June 27, 2025 07:24 — forked from detunized/join.sh
Join repos into subfolders with flat history
#!/bin/bash
set -euo pipefail
$REPO_DIR=~/devel
repos="1password bitwarden dashlane lastpass opvault passwordbox roboform stickypassword truekey zoho-vault"
# pull all repos
(
for repo in $repos; do
echo $repo
@mindplay-dk
mindplay-dk / README.md
Last active September 3, 2025 10:34
GNOME extension settings (Ubuntu)

These are my GNOME extension settings to make the Ubuntu desktop work mostly like Windows 8/10 used to work:

  • Bottom taskbar - Shows running applications with window previews (Dash to Panel)
  • Start menu - Traditional hierarchical application launcher accessed via menu button (ArcMenu)
  • Window snapping - Snap windows to predefined layouts by holding CTRL (Tiling Shell)
  • Emoji picker - Quick emoji insertion panel similar to Windows: WIN + . (Emoji Copy)
  • Desktop icons - I've turned them off because my Desktop is always a mess - save things in Documents instead.
  • Taskbar window previews - I've turned them off because they're annoying.
  • Application indicators - I've removed them because they're distracting.
@mindplay-dk
mindplay-dk / frameworks.md
Created March 30, 2025 07:32
DeepSeek really doesn't like React

between the most popular frontend frameworks (React, Svelte and Solid in particular) what are the features a modern frontend framework must have to be considered a serious option? focus on frontend frameworks with fine grained reactivity. ignore features like server side rendering and server components and focus on frontend features. identify features and requirements that are handled differently in each framework and focus on the problems they solve.

To be considered a serious modern frontend framework with fine-grained reactivity, the following features and capabilities are essential. These features address core challenges like efficient DOM updates, state synchronization, and developer ergonomics. Below is a breakdown of these requirements and how React, Svelte, and Solid handle them differently:


1. Fine-Grained Reactivity System

A framework must track dependencies at the most granular level (e.g., individual variables or DOM nodes) to update only what changes, avoiding

@mindplay-dk
mindplay-dk / translation.ts
Last active May 13, 2025 06:50
Type-safe language translations in TypeScript
const DANISH = {
"Hello {{name}}!": "Hej {{name}}",
"Welcome to the world": "Velkommen til Verden",
"You have {{amount}} {{cookies}}": "Du har {{amount}} {{cookies}}",
"cookie": "kage",
"cookies": "kager",
"Missing translation": "Manglende oversættelse",
}
type TranslationKey = keyof typeof DANISH
@mindplay-dk
mindplay-dk / convert.js
Created December 17, 2024 12:07
a horrible script to convert the entire PHP manual from HTML files to Markdown
const fs = require('fs');
const path = require('path');
const TurndownService = require('turndown');
// Directories
const inputDir = path.join(__dirname, 'html');
const outputDir = path.join(__dirname, 'markdown');
// Initialize Turndown
const turndownService = new TurndownService({
@mindplay-dk
mindplay-dk / bnf.md
Created August 16, 2024 09:33
Making sense of BNF, ABNF, EBNF syntax differences and history

Claude.ai just helped me make a whole lot more sense of the absolute mess that is BNF-family syntaxes. 🤔

I just discovered ABNF is actually a standard, RFC 4234.

Why isn't this more widely used?

BNF in the wild drives me nuts - no two grammars are ever written in the same flavor of BNF, and often grammars are published as merely "BFN" neglecting to even specify which BNF variant was used.

Are there any other BNF variants that are properly standardized?

@mindplay-dk
mindplay-dk / bias-quiz.md
Last active July 18, 2024 14:54
Bias quiz with Claude (or ChatGPT)

I want you to quiz me in my knowledge of biases, using the following method:

  1. Provide a brief and relatable (first- or third-person) story describing a hypothetical situation, in which one of these biases occur - and ask me to identify the type of bias.
  2. If I guess wrong the first time, provide a clue - something relating to the story. But don't be too obvious.
  3. If I guess wrong a second time, provide the answer, and relate it to the story - include a brief explanation of how/why my answer was wrong, explain the name of the correct bias, and the difference between the correct bias versus my answer.
  4. Begin from step 1 again with a different bias.

Below is a list of biases I'd like you to quiz me on:

  • Ambiguity Effect Bias: The tendency to choose options with known outcomes over those with unknown outcomes.
@mindplay-dk
mindplay-dk / vivaldi.css
Last active July 17, 2024 09:02
Vivaldi custom CSS
div#tabs-tabbar-container {
padding-top: 5px !important;
height: 34px !important;
}
div#header {
min-height: calc(40px / var(--uiZoomLevel)) !important;
}
.button-toolbar.workspace-popup.tabbar-workspace-button.button-menu {