Skip to content

Instantly share code, notes, and snippets.

View Cretezy's full-sized avatar

Cretezy

View GitHub Profile
class SerializerTest:
const _NATIVE_SERIALIZABLE_TYPES = [
TYPE_VECTOR2,
TYPE_VECTOR2I,
TYPE_VECTOR3,
TYPE_VECTOR3I,
TYPE_VECTOR4,
TYPE_VECTOR4I,
TYPE_RECT2,
TYPE_RECT2I,
@Cretezy
Cretezy / idType.ts
Last active February 23, 2026 23:51
ID Type in TypeScript
// -- Usage
// Declare ID
export const exampleIdUtils = createId("example")
export type ExampleId = ReturnType<typeof exampleIdUtils["generate"]>
// Generate IDs
const generatedExampleId = exampleIdUtils.generate() // Type: ExampleId
// Turn strings to IDs safely, convert them back to string transparently

Auto-copy files when creating Git worktrees or Jujutsu workspaces

The problem

Worktrees and workspaces are one of the best ways to work across multiple branches simultaneously — and they're especially powerful when pairing with AI coding tools like Claude Code or Cursor, where you might spin up a fresh workspace per task or conversation to keep things isolated and clean.

The friction point: ignored files don't carry over. Your .env, .env.local, API keys, local config — none of it comes with you. Every new worktree means manually hunting down and copying those files before you can actually get to work.

The solution: .worktree-copy

@Cretezy
Cretezy / claude-open.fish
Last active April 20, 2026 05:53
My current model configuration to use Claude Code with OpenRouter
function claude-open
env ANTHROPIC_BASE_URL="https://openrouter.ai/api" \
ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY" \
ANTHROPIC_API_KEY="" \
CLAUDE_CODE_DISABLE_1M_CONTEXT=1 \
ANTHROPIC_DEFAULT_HAIKU_MODEL="google/gemma-4-31b-it" \
ANTHROPIC_DEFAULT_SONNET_MODEL="qwen/qwen3.6-plus" \
ANTHROPIC_DEFAULT_OPUS_MODEL="z-ai/glm-5.1" \
claude $argv
end