Skip to content

Instantly share code, notes, and snippets.

@shaoyanji
shaoyanji / .gitattributes
Created October 12, 2026 14:32
Windows ↔ Linux Cross-Platform .gitattributes (LF normalization, shell safety, binary preservation)
# Auto-detect text files and normalize line endings to LF on commit
* text=auto eol=lf
# Explicit LF for shell scripts, configs, and Linux runtimes
*.sh text eol=lf
*.bash text eol=lf
*.zsh text eol=lf
*.fish text eol=lf
*.nu text eol=lf
*.nix text eol=lf
@shaoyanji
shaoyanji / SKILL.md
Created October 7, 2026 15:52
WSL Browser Controller Skill - Inspect and control active Windows Chrome and Edge tabs from WSL2 via UI Automation
name wsl-browser-controller
description Inspect and control active Windows browsers (Google Chrome, Microsoft Edge) directly from WSL2 using Windows UI Automation. Enumerate open tabs, inspect active tab, switch tabs, open URLs, and close tabs without requiring browser flags or remote debugging ports.

WSL Browser Controller Skill

Drive and inspect active Windows host browsers (Google Chrome, Microsoft Edge) directly from inside WSL2 using native Windows UI Automation over the WSL interop boundary.

@shaoyanji
shaoyanji / connecting-agents-to-todoist-api.md
Created October 5, 2026 20:04
Connecting Autonomous AI Agents to the Todoist API (API Drift, Non-FHS SSL, and Pre-Training Bias)

Connecting Autonomous AI Agents to the Todoist API

Overcoming API Drift, Non-FHS SSL Traps, and LLM Pre-Training Bias

When building autonomous agents or automated CLI pipelines that bridge digital workflows (like job search monitors, bug triagers, or server sentinels) to human task queues, Todoist is a natural target. It is ubiquitous, cross-platform, and has a clean REST API.

However, if you prompt current foundation models (from Claude and GPT-4o to open-weights models like Qwen 2.5) to write a native Todoist integration, they almost universally fail on live systems.

This guide documents the root architectural traps, why models fail, and a battle-tested, zero-dependency Python pattern for agents running on modern Linux (including NixOS and minimal containers).


@shaoyanji
shaoyanji / README.md
Created September 30, 2026 09:08
Resilient IMAP Telemetry Engine & Windows 11 Smart App Control (SAC) Bypass

Resilient IMAP Telemetry Engine: Bypassing Windows 11 Smart App Control (SAC) for Autonomous Pipelines

1. Problem Statement & Threat Model Context

In hardened Windows 11 environments, Smart App Control (SAC) and Device Guard User-Mode Code Integrity (UMCI) policies enforce kernel-level application whitelisting. Unsigned, self-compiled, or newly distributed native command-line binaries (such as open-source Rust/Go CLI utilities installed via Scoop, winget, or Cargo) are blocked by default:

Program 'himalaya.exe' failed to run: An Application Control policy has blocked this file
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
 + FullyQualifiedErrorId : NativeCommandFailed
@shaoyanji
shaoyanji / windows-migration-nushell-anicli-fixes.md
Created September 29, 2026 20:43
Windows Migration Post-Restore Fixes: Nushell, ani-cli (MegaPlay/Vidstream-2) & Scoop Toolchain

Windows Migration Post-Restore Fixes: Nushell, ani-cli & Scoop Toolchain

Comprehensive documentation of post-migration troubleshooting, root cause analysis, and fixes applied when restoring a developer environment from a local network backup (\\192.168.3.25\data\backup\windows).


1. Executive Summary

Issue Root Cause Fix Applied
@shaoyanji
shaoyanji / README.md
Last active September 23, 2026 10:16
TypeSafe Jev Kelly Resource Allocation Skill for Agent Reasoning Harnesses

TypeSafe Jev Kelly Resource Allocation for Agent Reasoning Harnesses

Dynamic risk-adjusted resource allocation for agentic reasoning harnesses using TypeSafe Jev System One judgments and the Kelly criterion.

Instead of burning tokens on sequential chain-of-thought monologues to decide if an idea is worth exploring, this architecture evaluates candidate hypotheses, tool calls, and plan branches in parallel (~500ms). It computes fractional Kelly stakes across pessimistic, base, and optimistic scenarios derived from Rumsfeld epistemic quadrants to size compute budgets: model tier selection (flash_lite / flash / pro), token caps, tool depth, subagent fan-out permissions, and code verification rigor.


Files in this Gist

@shaoyanji
shaoyanji / resume.json
Last active October 24, 2026 03:28
Matt Ji JSON Resume (English master, 2026-09-19 AI/retrieval flavor). GitHub MCP cannot overwrite gist b7b844737e6469c9160bf41aa8970068.
{
"basics": {
"email": "matt@bountystash.com",
"image": "https://res.cloudinary.com/de1eajx01/image/upload/v1765739348/lu7yx5irrcpfmisnhfzi.svg",
"signature": "https://res.cloudinary.com/de1eajx01/image/upload/v1765739484/qa7exxxy8xvzzkmjgyxn.png",
"label": "Software Engineer — AI systems, retrieval, evaluation",
"altLabels": [
"Senior AI Software Architect",
"Programmer, Engineer, Consultant"
],
@shaoyanji
shaoyanji / Bridge.cs
Created September 17, 2026 09:37
Rezi Resume MCP Bridge (Stdio to Streamable-HTTP for Antigravity and MCP clients)
using System;
using System.IO;
using System.Net;
using System.Text;
namespace ReziBridge
{
/// <summary>
/// Stdio-to-Streamable-HTTP Bridge for the Rezi Resume MCP Server.
/// Bridges MCP clients expecting stdio transport to Rezi's remote HTTP endpoint (https://api.rezi.ai/mcp).
@shaoyanji
shaoyanji / README.md
Created September 17, 2026 09:35
Rezi <-> JSON Resume Sync Engine (Bilingual EN/DE)

Rezi <-> JSON Resume Sync Engine

Bidirectional synchronization and validation between Rezi.ai's ATS format and JSON Resume (v1.0.0) with bilingual support (English resume.json & German lebenslauf.json).

Features

  • Non-Destructive Pull (from-rezi): Ingests new bullets and summary updates from Rezi without wiping custom fields (image, signature, profiles, meta.theme, courses).
  • Compliant Push (to-rezi): Flattens nested JSON Resume arrays into Rezi's multiline string structure (\n separated).
  • Bilingual Parity Check (check): Verifies chronology, dates, URLs, and entity counts between English and German versions.
  • Diff Inspector (diff): Inspects changes between your local file and remote Rezi before overwriting.

AGENTS.md — Session Handoff Packet

Project: Matt Ji CV / Cover Letter System

File Layout

File Purpose
Ji_Matt_CV.typ Main CV template (used by jobby resume typix)
standalone-cv.typ Standalone CV template (used by jobby resume / jobby deutsch)