Skip to content

Instantly share code, notes, and snippets.

@TimKochDev
TimKochDev / review-tim-public.md
Last active May 2, 2026 08:13
Adversarial complexity-prevention review subagent for Claude Code. Holds the thesis "this PR is useless and overengineered" until the diff disproves it. Snapshot from a team of 4 senior engineers, 100% Claude Code, Opus 4.7, April 2026 — expected to age fast.
name review-tim
description Prevents unnecessary complexity in the codebase by holding an adversarial thesis that the PR is useless and overengineered, and only releasing findings when the diff fails to disprove it. Sits one level above review-approach.
tools Read, Grep, Glob, Bash
model opus

You are the complexity-prevention review agent. Your goal is to keep the codebase free of features and state the stated problem does not actually require.

Read .agents/agents/review-preamble.md first — it defines thoroughness, classification, and false-positive rules that apply to all review agents.

@TimKochDev
TimKochDev / dell-xps-9560-fan-control-fix.md
Created March 14, 2025 22:03
Fix fan issues on Dell XPS 9560 running Linux

System Specifications

  • Device: Dell XPS 9560 (2017)
  • BIOS: 1.31.0
  • Distribution: Ubuntu Server 24.04.2 LTS
  • Kernel: 6.8.0-55-generic
  • Usage: As home server. 24/7 for three months until now

Problem Definition

Fans didn't switch off completely anymore even when temperatur was below 30°C.

@TimKochDev
TimKochDev / react-authentication-with-keycloak.ts
Created December 6, 2024 10:48
React authentication with Keycloak and oidc-client-ts. Redirect directly to Keycloak's registration page
// Note:
// - @react-keycloak/web is deprecated
// - Keycloak doesn't want to support their official JS adapter keycloak-js (https://www.keycloak.org/2022/02/adapter-deprecation.html)
// oidcConfig.ts
import {
UserManager,
WebStorageStateStore,
Log,
UserManagerSettings,
@TimKochDev
TimKochDev / migrate-users-with-password-hashes-to-keycloak.js
Created October 4, 2024 16:49
Import users with password hashes to Keycloak. Watch your encodings.
// Before moving to Keycloak, I used the following code to generate user credentials
const crypto = require("crypto");
const salt = crypto.randomBytes(16).toString("hex");
const hash = crypto
.pbkdf2Sync(password, this.salt, 10000, 64, "sha512")
.toString("hex");
// HEADS UP: Even though the salt was created as random bytes and then converted to its hex representation,
// the hashing function interpreted it as UTF-8. So this yields the same hash as the following:
const sameHash = crypto
@TimKochDev
TimKochDev / register-fonts.ts
Last active May 9, 2024 19:35
PDF visual regression testing using Playwright (e.g. react-pdf)
// Just to show what I had to deal with. Do NOT copy. React-pdf encourages you to import font from CDN directly.
import LatoBold from "../../../assets/fonts/Lato-Bold.ttf";
import LatoLight from "../../../assets/fonts/Lato-Light.ttf";
import Lato from "../../../assets/fonts/Lato-Regular.ttf";
import openSansFont from "../../../assets/fonts/OpenSans-Light.ttf";
export const PDF_BOLD_FONT_NAME = "Lato Bold";
export const PDF_LIGHT_FONT_NAME = "Lato Light";