Skip to content

Instantly share code, notes, and snippets.

View Prajwalsrinvas's full-sized avatar
🏠
Working from home

Prajwal Srinivas Prajwalsrinvas

🏠
Working from home
View GitHub Profile
@Prajwalsrinvas
Prajwalsrinvas / csm.py
Last active September 2, 2026 08:37
csm — map Claude Code local session UUIDs to cloud session_01 ids, both ways (fast indexed lookup)
#!/usr/bin/env python3
"""csm - map Claude Code session ids, both ways.
Claude Code gives the same session two unrelated identifiers:
local a1b2c3d4-... UUIDv4, 122 random bits. Assigned client-side by the
CLI; names its transcript at
~/.claude/projects/<escaped-cwd>/<uuid>.jsonl
cloud session_01 + 22 base58 chars, ~129 random bits. Assigned by the
server; appears in https://claude.ai/code/session_... links and in
@Prajwalsrinvas
Prajwalsrinvas / ssh-cm-status.py
Created February 18, 2026 10:04
SSH ControlMaster status dashboard — see active/stale multiplexed connections. Run with: uv run ssh-cm-status.py
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "rich",
# ]
# ///
"""
ssh-cm-status.py — SSH ControlMaster connection status dashboard.
Run with: uv run ssh-cm-status.py
@Prajwalsrinvas
Prajwalsrinvas / claude-code-credentials-guide.md
Created February 17, 2026 12:17
Claude Code Credentials: Read & Write Tokens on Every OS

Claude Code Credentials: Read & Write Tokens on Every OS

Claude Code stores OAuth tokens differently per platform. Here's how to access them manually.

Where Tokens Live

Platform Storage Location
macOS Encrypted Keychain Service: Claude Code-credentials
Linux JSON file ~/.claude/.credentials.json
@Prajwalsrinvas
Prajwalsrinvas / simultaneous-audio-output-linux.md
Created January 13, 2026 10:32
how to play audio through both your laptop speakers and an external monitor

Play Audio Through Multiple Speakers Simultaneously on Linux (PipeWire)

This guide shows how to play audio through both your laptop speakers and an external monitor (via HDMI) at the same time on Linux with PipeWire.

Prerequisites

  • Linux with PipeWire audio server (default on Ubuntu 22.10+, Fedora 34+, Pop!_OS 22.04+)
  • pactl command available (install with sudo apt install pulseaudio-utils if missing)

Step 1: Identify Your Audio Sink Names

@Prajwalsrinvas
Prajwalsrinvas / zclaude
Last active September 30, 2025 11:17
zclaude - Claude Code wrapper for Z.AI GLM models
#!/bin/bash
# zclaude - Claude Code wrapper for Z.AI GLM models
#
# WHAT THIS IS:
# A wrapper script that allows you to use Claude Code with Z.AI's GLM-4.6 models
# while keeping your original 'claude' command for Anthropic models intact.
#
# HOW IT WORKS:
# - Sets environment variables to redirect Claude Code to Z.AI's API endpoint
@Prajwalsrinvas
Prajwalsrinvas / copyq_ubuntu_setup.md
Created August 25, 2025 15:07
CopyQ Setup: Super+V Shortcut & Autostart

CopyQ Setup: Super+V Shortcut & Autostart

Working setup for CopyQ clipboard manager with Super+V keyboard shortcut and autostart on Ubuntu 24.04 GNOME.

Install & Setup

# Install CopyQ
sudo apt install copyq