Skip to content

Instantly share code, notes, and snippets.

@PeronGH
PeronGH / fex-on-fedora.md
Created April 21, 2026 07:09
FEX on Fedora
sudo dnf install fex-emu fuse
mkdir -p ~/.fex-emu
echo '{"Config":{"RootFS":"/usr/share/fex-emu/RootFS/default.erofs"}}' > ~/.fex-emu/Config.json
@PeronGH
PeronGH / oci-byoi-arm-notes.md
Created April 19, 2026 08:01
OCI Custom Image Import on ARM Always Free — hard-won notes

OCI Custom Image Import on ARM Always Free — hard-won notes

Field notes from wiping a FreeBSD Always Free A1.Flex and standing up a fresh Fedora 43 aarch64 via BYOI. Captures the things that are either undocumented, contradicted between docs pages, or only discoverable by trying.

Environment: us-sanjose-1, VM.Standard.A1.Flex (4 OCPU / 24 GB), 200 GB BV / 10 VPUs, Fedora-Cloud-Base-Generic-43-1.6.aarch64.qcow2.

TL;DR — the working recipe

  1. Upload the aarch64 qcow2 to an Object Storage bucket.
  2. Create the custom image via raw API (CLI can't do it) with launchMode=CUSTOM and explicit launchOptions containing firmware=UEFI_64 plus PV everywhere.
@PeronGH
PeronGH / factory-api.ts
Last active March 15, 2026 15:25
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 15, 2026 09:48
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