Skip to content

Instantly share code, notes, and snippets.

@vpzed
vpzed / cortex-linux-systemd-user-services.md
Last active July 16, 2026 04:03
Cortex Linux systemd USER service units

Cortex Linux systemd USER service units

For cortex v6.8.4

Management syntax

systemctl --user start nats@<slug>  # e.g. nats@luna
@vpzed
vpzed / mucker_debian.md
Last active July 4, 2026 04:03
Northwood Sentinel Mucker install on Debian 13

Install Northwoods Sentinel muckers on Debian 13 x64

Install a local Linux application that simulates a Northwoods Sentinel Cloudflare cloud deployed mucker

Northwoods Sentinel muckers

IMPORTANT: This process assumes sudo is already installed and the normal user account, mucker, is in the sudo group.

Prerequisites

@vpzed
vpzed / cortex_debian.md
Last active August 4, 2026 21:21
Metafactory Cortex on Debian 13

Cortex install on Debian 13.6 x64

Metafactory Cortex

  • Written for cortex v6.10.3
  • Installation assumes sudo is installed and the user is in the sudo group; however, the 2 initial steps can be done as root with the appropriate username specified in the 'loginctl enable-linger' command. The user running cortex does not need elevated privileges.

Prerequisites

System packages

@vpzed
vpzed / pai-claude-loopback-fs.txt
Last active May 2, 2026 14:33
Using a case-insensitive Linux filesystem for the PAI .claude directory
# Flow with PAI being MacOS instead of fighting it
# Use a case-insensitive filesystem just for .claude
cd $HOME
mv .claude claude-temp
# Adjust count for desired filesystem size
dd if=/dev/zero of=claude.img bs=1M count=10240
mkfs.ext4 -O casefold claude.img
mkdir .claude
sudo mount -o loop claude.img .claude
@vpzed
vpzed / claude.local.md
Created April 26, 2026 17:42
Claude Code CLAUDE.md addition to combat stalled background agents

Background Agents and Agent Teams

Use the Agent skill for background agents and agent teams. Each agent gets a fresh tool registry, so heartbeats only work if the spawner sets them up correctly. Read the caveat below before writing any agent prompt.

Tool registry caveat (read this before spawning)

The Task* tools (TaskCreate, TaskUpdate, TaskGet, TaskList, TaskOutput, TaskStop) are deferred in this harness. They appear by name in the deferred-tools system reminder but their JSONSchema is not loaded until something calls ToolSearch("select:TaskCreate,TaskUpdate,…"). A spawned agent inherits the same deferred state — telling it to call TaskUpdate directly without first loading the schema produces an InputValidationError and the heartbeat silently never fires. Observed failure mode: the agent reports back "TaskUpdate is not in my tool registry; I proceeded without heartbeats."

@vpzed
vpzed / pai30-env-template.sh
Last active February 22, 2026 15:23
PAI 3.0 env.sh style template for use with CLAUDE_ENV_FILE
#!/usr/bin/env bash
# PAI 3.0 Environment Variables Template — env.sh / CLAUDE_ENV_FILE Edition
# Generated: 2026-02-16 | Adapted for Claude Code CLAUDE_ENV_FILE: 2026-02-20
#
# SETUP INSTRUCTIONS:
# 1. Copy: cp pai30-env-template.sh $HOME/.config/PAI/pai-env.sh
# 2. Lock down: chmod 600 $HOME/.config/pai-env.sh
# 3. Fill in: Uncomment (remove #) from lines you need and add real keys
# 4. Register: export CLAUDE_ENV_FILE="$HOME/.pai-env.sh"
# (add to ~/.bashrc / ~/.zshrc for persistence)
@vpzed
vpzed / env.template
Created February 18, 2026 00:04
Draft PAI 3.0 env template
# PAI 3.0 Environment Variables Template
# Generated: 2026-02-16 by PAI 3.0
#
# IMPORTANT: Never commit .env files to version control!
#
# =============================================================================
# AI/ML SERVICES
# =============================================================================
@vpzed
vpzed / env.template
Last active January 25, 2026 20:59
PAI 2.4.0 env.template
# PAI Environment Configuration Template
# Copy to .env and fill in your API keys:
# cp env.template .env
#
# Keys are loaded by PAI tools from ~/.claude/.env
# ============================================================================
# CORE AI SERVICES
# ============================================================================

Setting up PAI v2.1.0 on a fresh Debian 13 virtual machine

IMPORTANT: As of January 09, 2025

This is a guide for humans. The intent is to cover pre-requisite items to smooth the PAI installation process.

Base Virtual Machine

Debian 13 virtual machine

  • Built with standard debian-13.*.*-amd64-netinst.iso
@vpzed
vpzed / mock.py
Last active December 22, 2022 22:25
Simple asyncpg test script with jsonb field (python 3.6.3, Postgres 10.0, and asyncpg 0.13.0)
#!/usr/bin/env python
# Use /usr/bin/env python to support virtual environments
# This script is for Python > 3.6
# -*- coding: utf-8 -*-
"""
Test loading mock initial alliances data into a test table with asyncpg and Postgres
"""
import datetime
import json