Skip to content

Instantly share code, notes, and snippets.

@maoyeedy
maoyeedy / SKILL.md
Created April 25, 2026 09:48
haiku-satirist skill

name: haiku-satirist description: > Generates a single satirical Chinese haiku (俳句) in the 物哀 + 最上川 style whenever a user describes an absurd, ironic, or self-contradictory modern situation — e.g., performative self-improvement, social media posturing, lifestyle branding colliding with cheap reality, or any gap between how someone presents themselves and what they actually do. Trigger on inputs like: "帮我写一首俳句", "给这个情况写首诗", "用俳句总结一下", or any anecdote where a grand self-image crashes into a petty reality. Also trigger when the user pastes a vignette and says nothing — the implied request is always a haiku.

@maoyeedy
maoyeedy / WSL2.md
Last active April 24, 2026 21:59
Guide to setting up a secure, sandboxed AI development environment using Arch Linux on WSL2 with Fish shell. (AI generated)

Zero-Trust AI Development Environment (WSL2 CachyOS)

Audience: Experienced CachyOS/Arch WSL users. Focuses on Podman 5.x pasta networking and April 2026 agent schemas.

A high-density guide for deploying a hardened, fully sandboxed AI environment using native CachyOS packages and rootless Podman.

1. Fast Track Installation

Install agents, container stack, and crucial feature-parity dependencies.

@maoyeedy
maoyeedy / opencode-toast.ts
Last active May 6, 2026 10:57
Toast when action complete with actual files modified. Windows only and requires toast.exe on path. https://github.com/shanselman/toasty
import type { Plugin } from "@opencode-ai/plugin";
// Plays a small toast when OpenCode goes idle.
// Customize the command, title, and messages with OPENCODE_BELL_* env vars.
declare const process: {
env: Record<string, string | undefined>;
};
type OpenCodeEvent = {
- name: Fail if tracked files are ignored (except debug symbols)
shell: bash
run: |
set -euo pipefail
# Find tracked files that match ignore rules
bad_files=$(git ls-files --cached --ignored --exclude-standard 2>/dev/null || true)
if [ -z "$bad_files" ]; then
exit 0
[CmdletBinding()]
param()
if (-not (Get-Command -Name 'Get-UnityVersion' -ErrorAction SilentlyContinue)) {
. "$PSScriptRoot\functions.ps1"
}
Write-Host "`nConfiguring Git submodules..." -ForegroundColor Yellow
try{
# git config submodule.recurse true

C# Naming

  • PascalCase: public members, methods, constants
  • _camelCase: private fields (static or instance)
  • PascalCase: public static fields and properties
  • camelCase: local variables and parameters

C# Syntax & Patterns

  • var for apparent local variables
  • Target-typed new() — never new TypeName()
  • Allman-style braces
@maoyeedy
maoyeedy / Get-UnityInstallationRoot.ps1
Created May 7, 2025 18:50
Find Unity editor installations from Unity Hub
function Get-UnityInstallationRoot {
$userPathFile = "$env:APPDATA\UnityHub\secondaryInstallPath.json"
# Check if Unity Hub is installed, if installed, then must come with this file
if (-not (Test-Path $userPathFile)) {
Write-Warning "Unity Hub not installed."
return $null
}
# By default, it only has two quotes: ""
@maoyeedy
maoyeedy / CameraAmbientOverride.cs
Last active June 28, 2025 07:09
[Unity] Override Camera Ambient Color for SRP
using UnityEngine;
using UnityEngine.Rendering;
namespace CameraAmbientOverride
{
/// <summary>
/// Attach it to camera. Supports both URP and HDRP.
/// </summary>
[DisallowMultipleComponent]
[RequireComponent(typeof(Camera))]
@maoyeedy
maoyeedy / PlaymodeGamepadToggle.cs
Last active April 1, 2026 20:26
[Unity] Toggle Play Mode with Gamepad Buttons
#if UNITY_EDITOR && ENABLE_INPUT_SYSTEM
using UnityEditor;
using UnityEngine.InputSystem;
namespace Project.Editor
{
[InitializeOnLoad]
public static class GamepadPlayModeController
{
private static bool _wasPressingBoth;
@maoyeedy
maoyeedy / ScreenshotRecorder.cs
Last active April 29, 2025 20:15
[Unity] Advanced Screenshot Recorder
#if UNITY_EDITOR
using System;
using System.IO;
using UnityEditor;
using UnityEditor.Recorder;
using UnityEditor.Recorder.Input;
using UnityEngine;
using UnityEngine.InputSystem;
namespace Screenshot