Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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