Skip to content

Instantly share code, notes, and snippets.

View mkusaka's full-sized avatar
🎅
Ho-Ho-Ho!

mkusaka

🎅
Ho-Ho-Ho!
View GitHub Profile
@azu
azu / difit-auto-detect.sh
Last active March 7, 2026 11:40
cmux browser open-split difit review
#!/bin/bash
# =============================================================================
# difit-auto-detect.sh
# Automatically detects git state and opens appropriate diff view
# with difit in a cmux browser split pane.
#
# Dependencies:
# - cmux https://cmux.app/
# - difit https://github.com/yoshiko-pg/difit
@privatenumber
privatenumber / typescript-v5-to-v6.md
Created February 24, 2026 13:21
TypeScript 5.x to 6.0 Migration Guide

TypeScript 5.x to 6.0 Migration Guide

TypeScript 6.0 is a transition release bridging 5.9 and the forthcoming 7.0 (a native Go port). Most changes are new defaults and deprecations preparing for 7.0. Here is what you need to do:

Most projects need these tsconfig changes:

{
    "compilerOptions": {
        "types": ["node"],           // @types are no longer auto-discovered (see §1.6)
@mattn
mattn / .gitconfig
Last active February 24, 2026 04:20
[alias]
sweep-branch = "!git for-each-ref refs/heads/ --format=\"%(refname:short)\" | while read branch; do [ \"$branch\" = main ] || [ \"$branch\" = master ] && continue; git rev-parse --abbrev-ref HEAD | grep -qx \"$branch\" && continue; mergeBase=$(git merge-base main \"$branch\" 2>/dev/null) || continue; treeCommit=$(git commit-tree \"$(git rev-parse \"$branch^{tree}\")\" -p \"$mergeBase\" -m _); cherry=$(git cherry main \"$treeCommit\" 2>/dev/null); case \"$cherry\" in \"-\"*) git branch -D \"$branch\" ;; esac; done"
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
# Create a new worktree and branch from within current git directory.
ga() {
if [[ -z "$1" ]]; then
echo "Usage: ga [branch name]"
exit 1
fi
local branch="$1"
local base="$(basename "$PWD")"
local path="../${base}--${branch}"
@laiso
laiso / fork-context.md
Created November 10, 2025 09:41
~/.claude/agents/fork-context.md
name description forkContext model
fork-context
Fork the context of the conversation and return its full analysis verbatim.
true
inherit

You are an agent that forks the context of the conversation and returns its full analysis verbatim.

Your job:

@qnighy
qnighy / rsc-memo.md
Last active November 20, 2025 10:40
React Server Components 備忘録
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active February 10, 2026 22:03
ローカルLLMはこーやって使うの💢
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dninomiya
dninomiya / form.tsx
Last active December 6, 2023 09:31
'use client';
import * as z from 'zod';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
import { Button } from '@/app/components/ui/button';
import {
Form,
FormControl,
FormField,
@odashi
odashi / should_mute_on_twitter.txt
Last active December 26, 2022 13:02
should_mute.txt
あまり大きな声で言えないのですが
あまり知られてないのですが
ありえない
あんまり言いたくないけど
いい加減にしてほしい
いい歳してお恥ずかしいのですが
悪用厳禁なのですが
安心してください
言いたくない過去を言うと
言わせてください