Skip to content

Instantly share code, notes, and snippets.

View heracek's full-sized avatar

Tomáš Horáček heracek

View GitHub Profile
@adamamyl
adamamyl / macos26-breaks-custom-dns.md
Last active March 30, 2026 00:56
Bug Report: macOS 26 breaks /etc/resolver/ supplemental DNS for custom TLDs

Ah, the joys of waking up to find the Mac's done an overnight upgrade… and erm, suddenly things stop working. Thankfully, me and Claude managed to work out what the fuck is going on… I'm sharing here, as well as having raised in on https://feedbackassistant.apple.com/feedback/22280434 (that seems to need a login?).

Bug Report: macOS 26 breaks /etc/resolver/ supplemental DNS for custom TLDs

Product: macOS 26.3.1 (Darwin 25.3.0, Build 25D771280a) Component: Networking → DNS / mDNSResponder Regression from: macOS 25.x 26.3.0 (working immediately prior to overnight update)


@wiesson
wiesson / migrate.sh
Last active February 7, 2026 13:21
Convex deployment migration script — exports data from one deployment and imports into another with --replace-all. Handles the .env.local precedence gotcha by swapping it temporarily, uses --prod on both export/import, and includes a full migration checklist (env vars, deploy, Stripe, Vercel).
#!/usr/bin/env bash
set -euo pipefail
# ─── Convex Deployment Migration ─────────────────────────────────────────────
# Exports data from one Convex deployment and imports into another with
# --replace-all. Handles the .env.local precedence gotcha by swapping it
# temporarily, uses --prod on both export/import, and includes a full
# migration checklist (env vars, deploy).
#
# Usage:
@danialhasan
danialhasan / claude-cli-experiments.md
Created January 9, 2026 07:29
Claude CLI Print Mode Experiments - Raw data from testing claude -p flag combinations (2026-01-08)

Claude CLI Print Mode Experiments

Date: 2026-01-08
CLI Version: 2.1.2
Total Experiments: 29

Raw experiment outputs from testing various claude -p flag combinations.


@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.

@alavkx
alavkx / migration-guide.md
Last active March 12, 2026 23:17
@tanstack/query --> @tanstack/db React Migration Guide

Migration Guide: React Query → TanStack DB

Migration Pattern

Replace React Query's server state management with TanStack DB's client-side database.

BEFORE: React Query

// api/posts.ts
export const postsApi = {
  getAll: async (): Promise<Post[]> => fetch('/api/posts').then(r => r.json()),
@t3dotgg
t3dotgg / try-catch.ts
Last active March 25, 2026 16:17
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@faustinoaq
faustinoaq / myAngular.html
Last active January 17, 2026 17:44
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@xfournet
xfournet / pluginHttp2Proxy.ts
Last active June 27, 2025 21:38
Vite support for HTTP2 and proxy
import proxy from 'http2-proxy';
import type { Plugin, ProxyOptions } from 'vite';
export const pluginHttp2Proxy = (): Plugin => {
let routes: Record<string, string | ProxyOptions>;
return {
name: 'vite-plugin-http2-proxy',
config: (config) => {
const { server } = config;
routes = server?.proxy ?? {};
@gaearon
gaearon / 00-README-NEXT-SPA.md
Last active January 29, 2026 09:20
Next.js SPA example with dynamic client-only routing and static hosting

Next.js client-only SPA example

Made this example to show how to use Next.js router for a 100% SPA (no JS server) app.

You use Next.js router like normally, but don't define getStaticProps and such. Instead you do client-only fetching with swr, react-query, or similar methods.

You can generate HTML fallback for the page if there's something meaningful to show before you "know" the params. (Remember, HTML is static, so it can't respond to dynamic query. But it can be different per route.)

Don't like Next? Here's how to do the same in Gatsby.