Skip to content

Instantly share code, notes, and snippets.

@solrz
solrz / fetch-claude-usage.swift
Last active March 19, 2026 16:51
Claude Code Statusline - Shows context usage (C:), 5-hour API usage (S:), and weekly usage remaining (W:) with color gradients
#!/usr/bin/env swift
import Foundation
func readSessionKey() -> String? {
// TODO: Replace with your session key from claude.ai cookies
let injectedKey = "YOUR_SESSION_KEY_HERE"
let trimmedKey = injectedKey.trimmingCharacters(in: .whitespacesAndNewlines)
return trimmedKey.isEmpty ? nil : trimmedKey
}
@solrz
solrz / companion01.glsl
Last active January 26, 2026 17:35
The shader for naked-eye 3D display Companion 01, which realtime convert RGB-D video on device. Change constant may required for each device.
//!HOOK OUTPUT
//!BIND HOOKED
//!DESC Lenticular 3D - Full-SBS Fix V3
precision highp float;
// --- 參數設置 ---
#define LINE_NUMBER 19.6401
#define OBLIQUITY 0.105