Skip to content

Instantly share code, notes, and snippets.

@PeronGH
PeronGH / factory-api.ts
Last active March 10, 2026 14:13
LLM API Extraction PoC
#!/usr/bin/env -S deno run -A --env
/**
* factory-api.ts — Factory.ai auth + local API proxy.
*
* Login (saves credentials to .env):
* deno run -A factory-api.ts login > .env
*
* Serve (auto-reads .env, proxies with injected credentials):
* deno run -A --env factory-api.ts serve [--port 8000] [--host 127.0.0.1]
*
@PeronGH
PeronGH / fedora-lid-close.md
Created February 25, 2026 03:11
Prevent Sleep on Lid Close — Fedora (GNOME/GDM)

Prevent Sleep on Lid Close — Fedora (GNOME/GDM)

Tested on Fedora 43 with GNOME Shell 49.4. Two layers need to be configured: systemd-logind (the system) and GDM's gsd-power (the greeter), because GDM runs its own GNOME settings daemon that suspends independently.

1. Tell systemd-logind to ignore the lid switch

sudo mkdir -p /etc/systemd/logind.conf.d

sudo tee /etc/systemd/logind.conf.d/lid.conf << 'EOF'
@PeronGH
PeronGH / mikado-workflow.md
Last active March 10, 2026 12:05
CLAUDE.md & AGENTS.md

Workflow

The existing code and its behavior are the source of truth. Every non-trivial change uses the Mikado method, adapted for agent workflows.

Mikado Plans (/docs/plans/)

Each plan is a numbered file (001-slug.md) tracking one top-level change. A fresh agent instance must be able to read the plan and know exactly where to start. Plans contain:

  1. Goal: one-line summary of the top-level change.
  2. Context: what the change is about and why it's needed — enough for a fresh instance to orient without reading the full codebase.
@PeronGH
PeronGH / ROCm-WSL-Strix-Halo.md
Last active March 8, 2026 23:30
Set up ROCm in WSL on Strix Halo Systems

How to Set up ROCm in WSL on Strix Halo Systems

First, wsl --install Ubuntu-24.04

In Ubuntu 24.04:

Install deps:

sudo apt update
sudo apt install -y ca-certificates wget gpg
@PeronGH
PeronGH / script.go
Created December 30, 2025 13:24
Go Script
//usr/bin/env go run "$0" "$@"; exit
package main
import "fmt"
func main() {
fmt.Println("Hello, world!")
}
@PeronGH
PeronGH / convert_to_sid.sh
Last active November 29, 2025 16:51
Debian Setup
#!/bin/bash
# safety tools
apt install apt-listbugs apt-listchanges
# modify apt source
# post upgrade
apt autoremove --purge
apt modernize-sources
@PeronGH
PeronGH / filterlist.txt
Last active November 28, 2025 19:24
AdFilter
! Remove YouTube preview in Gemini Web
gemini.google.com##.single-video-container
@PeronGH
PeronGH / brew.sh
Last active November 27, 2025 11:57
Modern CLI
#!/bin/bash
# modern utils
brew install rg fd zoxide dust duf bat sd procs tlrc jq
# modern vcs
brew install jj
@PeronGH
PeronGH / remote_git_ssh.md
Last active December 2, 2025 15:41
Quick Remote SSH Deployment

Remote server:

git init
git config receive.denyCurrentBranch updateInstead

touch .git/hooks/post-receive
chmod +x .git/hooks/post-receive
@PeronGH
PeronGH / windows-gaming-on-macos-guide.md
Last active August 10, 2025 12:22
Windows Gaming on macOS Guide

Windows Gaming on macOS Guide

Steps

  1. Install GPTK
brew install --cask --no-quarantine gcenx/wine/game-porting-toolkit