Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bun
/**
* ============================================================
* PROOF: Anthropic is specifically blocking "OpenCode"
* in Claude Code OAuth system prompts
* ============================================================
*
* Video covering this script here: https://www.youtube.com/watch?v=G9YX6StP2-M
*
* This script demonstrates that Anthropic has specifically blocked
@SilenNaihin
SilenNaihin / commit-smart.md
Last active February 8, 2026 14:22
Claude Code: Atomic Git Commit command for multi-agent workflows

Atomic Git Commit

Create an atomic git commit for the changes made in this session.

Instructions

  1. First, run git status to see all changes (staged, unstaged, and untracked files).

  2. Identify only the files you touched in this session. Do not commit files modified by other agents or processes.

@minimaxir
minimaxir / CLAUDE.md
Created January 2, 2026 01:57
Rust CLAUDE.md (20260101)

Agent Guidelines for Rust Code Quality

This document provides guidelines for maintaining high-quality Rust code. These rules MUST be followed by all AI coding agents and contributors.

Your Core Principles

All code you write MUST be fully optimized.

"Fully optimized" includes:

# 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}"
@spenceriam
spenceriam / AGENTS.md
Last active March 2, 2026 02:41 — forked from Xuanwo/AGENTS.md
Xuanwo's AGENTS.md (converted to English)

0 · About the User and Your Role

  • The person you are assisting is User.
  • Assume User is an experienced senior backend/database engineer, familiar with mainstream languages and their ecosystems such as Rust, Go, and Python.
  • User values "Slow is Fast", focusing on: reasoning quality, abstraction and architecture, long-term maintainability, rather than short-term speed.
  • Your core objectives:
    • As a strong reasoning, strong planning coding assistant, provide high-quality solutions and implementations in as few interactions as possible;
    • Prioritize getting it right the first time, avoiding superficial answers and unnecessary clarifications.

@mchiang0610
mchiang0610 / ollamas-adventure.html
Created October 16, 2025 03:10
Example code by GLM-4.6 in a single pass
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ollama's Adventure</title>
<style>
* {
margin: 0;
padding: 0;
# Claude Code CLI Environment Variables
# This file lists all environment variables used in v2.1.118 with explanations
## Anthropic API & Authentication
ANTHROPIC_API_KEY - Primary API key for Anthropic's Claude API. Used as fallback when no OAuth token is configured
ANTHROPIC_AUTH_TOKEN - Alternative bearer token for Anthropic services. Takes priority over ANTHROPIC_API_KEY for authorization headers
ANTHROPIC_BASE_URL - Custom base URL for Anthropic API endpoints. Overrides the default api.anthropic.com endpoint
ANTHROPIC_BETAS - Comma-separated list of beta feature headers to include in API requests. Appended to internal beta flags
ANTHROPIC_CONFIG_DIR - Override Anthropic config directory. Falls back to XDG_CONFIG_HOME/anthropic, then HOME/.config/anthropic
@AlmogBaku
AlmogBaku / MediumConverter.py
Last active November 28, 2024 06:31
Medium to Markdown
import mimetypes
import os
import markdownify
import requests
mimetypes.init()
class MediumConverter(markdownify.MarkdownConverter):
@bsharper
bsharper / map_models.py
Last active February 12, 2026 04:20
Map ollama models to normal filenames using symbolic links (Linux / macOS / Windows)
# Run without arguments to see what is found.
# Run with a path as an argument to create links to ollama models there.
# This will remove any files that follow the exact filename as the new link file, so use with caution!
import os
import sys
import json
import platform
@llimllib
llimllib / mssql_to_csv.bash
Last active October 6, 2025 08:57
This is a script to convert every table in a Microsoft SQL Server database backup (.bak file) to a .csv file
#!/usr/bin/env bash
# import an MS SQL .bak backup file to an MS SQL database, then export all
# tables to csv. run this script as `import.sh <filename>`. It expects to be
# run in the same directory as the backup file.
# this is only tested on my mac (OS X Catalina). I tried to stick to posix, but
# It will probably require some tweaking for you. I hope it gives a general
# sense of what you need to do at the very least.