Skip to content

Instantly share code, notes, and snippets.

# Claude Code CLI Environment Variables
# This file lists all environment variables used in cli.js with explanations
process.env.__CFB - Internal Node.js buffer flag
process.env.__MINIMATCH_TESTING_PLATFORM__ - Testing flag for minimatch library platform detection
process.env.ALACRITTY_LOG - Alacritty terminal emulator log level configuration
process.env.ALIYUN_REGION_ID - Alibaba Cloud region identifier for Chinese cloud services
process.env.ANTHROPIC_API_KEY - Primary API key for authenticating with Anthropic's Claude API
process.env.ANTHROPIC_AUTH_TOKEN - Alternative authentication token for Anthropic services
process.env.ANTHROPIC_BASE_URL - Custom base URL for Anthropic API endpoints
import dspy
from pydantic import BaseModel
from typing import List
class State(BaseModel):
name: str
abbreviation: str
capital: str
class States(BaseModel):
@s3rius
s3rius / Cargo.toml
Last active February 5, 2026 12:48
PyO3-asyncio async streams
[package]
name = "itertest"
version = "0.1.0"
edition = "2021"
[dependencies]
futures = "0.3.28"
pyo3 = "0.19.2"
pyo3-asyncio = { version = "0.19.0", features = ["tokio-runtime"] }
tokio = { version = "1.32.0", features = ["sync"] }
@DGriffin91
DGriffin91 / bevy_texture_to_png.rs
Last active January 5, 2024 20:12
Bevy Texture to PNG
// License: Apache-2.0 / MIT
use bevy::core_pipeline::{
draw_3d_graph, node, AlphaMask3d, Opaque3d, RenderTargetClearColors, Transparent3d,
};
use bevy::prelude::*;
use bevy::reflect::TypeUuid;
use bevy::render::camera::{ActiveCamera, CameraTypePlugin, RenderTarget};
use bevy::render::render_asset::RenderAssets;
use bevy::render::render_graph::{NodeRunError, RenderGraph, RenderGraphContext, SlotValue};
@kestein
kestein / Private_Crates.md
Last active June 17, 2025 18:34
Linking to a private repo in Cargo.toml

Under the dependencies section, put

<crate name>={git="ssh://git@github.com/<organization>/<reponame>.git"}

It is pretty similar to a github repo's ssh cloning link, however the : is replaced with a / and ssh:// is prepended to the URL.

git@github.com:my-organization/my-repo.git vs ssh://git@github.com/my-organization/my-repo.git

The SSH URL needs to be used because Cargo is currently unable to handle the authentication prompt that comes up when an HTTPS link is used.
Make sure that the matches the crate name in the target repo's Cargo.toml. The repo name will not override what is in the Cargo.toml if it is a different value.

@mfd
mfd / GTWalsheimPro.css
Last active January 25, 2026 05:41
GT Walsheim Pro
@font-face {
font-family: GT Walsheim Pro;
src: local("GT Walsheim Pro Regular"),local("GTWalsheimProRegular"),url(GTWalsheimProRegular.woff2) format("woff2"),url(GTWalsheimProRegular.woff) format("woff"),url(GTWalsheimProRegular.ttf) format("truetype");
font-weight: 400;
font-style: normal
}
@font-face {
font-family: GT Walsheim Pro;
src: local("GT Walsheim Pro Bold"),local("GTWalsheimProBold"),url(GTWalsheimProBold.woff2) format("woff2"),url(GTWalsheimProBold.woff) format("woff"),url(GTWalsheimProBold.ttf) format("truetype");
@squarism
squarism / iterm2.md
Last active February 10, 2026 11:09
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
@dgp
dgp / youtube api video category id list
Created June 11, 2015 05:57
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@eegrok
eegrok / mac-keycodes
Last active December 27, 2025 17:07
Mac virtual keycodes
from: http://www.meandmark.com/keycodes.html
with some additions from people in the comments, thanks :)
Virtual Keycodes for the Mac QWERTY Layout
Keycodes are in hexadecimal. A blank entry means either there is no key assigned to that keycode or I was unable to find the assigned key.
Keycode Key
0x00 A
0x01 S
0x02 D