Skip to content

Instantly share code, notes, and snippets.

@robzolkos
robzolkos / interview.md
Created December 28, 2025 20:39
Claude Code Interview command by Thariq
description Interview me about the plan
argument-hint
plan
model opus

Read this plan file $1 and interview me in detail using the AskUserQuestionTool about literally anything: technical implementation, UI & UX, concerns, tradeoffs, etc. but make sure the questions are not obvious.

TypeScript Type Performance Cheat Sheet

Principles

1. Build up, not down

Combine sets of properties using interface extensions rather than extracting them using utilities like Omit.

@burkeholland
burkeholland / 4.1.chatmode.md
Last active May 1, 2026 20:27
4.1 Beast Mode v2
description 4.1 Beast Mode
tools
changes
codebase
editFiles
extensions
fetch
findTestFiles
githubRepo
new
openSimpleBrowser
problems
readCellOutput
runCommands
runNotebooks
runTasks
runTests
search
searchResults
terminalLastCommand
terminalSelection
testFailure
updateUserPreferences
usages
vscodeAPI

You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.

import type { StandardSchemaV1 } from "@standard-schema/spec"
import { NonEmptyArray } from "effect/Array"
import * as Data from "effect/Data"
import * as Effect from "effect/Effect"
import * as Predicate from "effect/Predicate"
export class StandardSchemaError extends Data.TaggedError(
"StandardSchemaError",
)<{ readonly issues: NonEmptyArray<StandardSchemaV1.Issue> }> {
static fromFailure(
@khalidx
khalidx / node-typescript-esm.md
Last active May 2, 2026 04:25
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@nmquebb
nmquebb / json-agg.ts
Last active August 26, 2025 02:31
json agg for drizzle
export function jsonAgg<T extends Record<string, AnyColumn>>(select: T) {
const chunks: SQL[] = [];
Object.entries(select).forEach(([key, column], index) => {
if (index > 0) chunks.push(sql`,`);
chunks.push(sql.raw(`'${key}',`), sql`${column}`);
});
return sql<InferColumnsDataTypes<T>[]>`
coalesce(
const tuple = ["a", "b", "c", "d"] as const;
type Tuple = typeof tuple;
type FirstElement<Tuple extends readonly any[]> = Tuple[0];
type ShiftOne<Tuple extends readonly any[]> = Tuple extends readonly [Tuple[0], ...infer U] ? U : never;
type PopOne<Tuple extends readonly any[]> = Tuple extends readonly [...infer U, Tuple[number]] ? U : never;
type LastElement<Tuple extends readonly any[]> = Tuple extends readonly [...Tuple[number], infer U] ? U : never;
type Indices<Tuple extends readonly any[], TStart extends number[]> = Tuple['length'] extends 0 ? PopOne<[0, ...TStart]> : Indices<ShiftOne<Tuple>, [Tuple['length'], ...TStart]>;
@Webreaper
Webreaper / docker-compose.yml
Last active January 30, 2026 08:41
Sample Docker-compose file which shows how to set up Sonarr, Radarr, Prowlarr, Lidarr, QBittorrent and a VPN container so that all all traffic from the containers is routed through the VPN. Also includes Plex and get_iplayer containers, which are not routed through the VPN.
# Docker compose to set up containers for all services you need:
# VPN
# Sonarr, Radarr, Lidarr, Qbittorrent
# Non-VPN
# Plex, get_iplayer
# Before running docker-compose, you should pre-create all of the following folders.
# Folders for Docker State:
# /volume1/dockerdata. - root where this docker-compose.yml should live
# /volume1/dockerdata/plex - Plex config and DB
# /volume1/dockerdata/sonarr - Sonarr config and DB