Skip to content

Instantly share code, notes, and snippets.

View ElijahLynn's full-sized avatar
😎
All Your DevOps Belong To Us

Elijah Lynn ElijahLynn

😎
All Your DevOps Belong To Us
View GitHub Profile
@ElijahLynn
ElijahLynn / lid-sleep.fish
Last active June 30, 2026 19:24
Fish shell function to toggle lid-close sleep on Arch Linux (systemd)
# https://gist.github.com/ElijahLynn/adf761215c85a5d8136ced38d4022ddd
function lid-sleep --description "Toggle or check lid-close sleep behaviour"
set config /etc/systemd/logind.conf.d/lid.conf
switch $argv[1]
case help --help -h
echo "Usage: lid-sleep [on|off|status|help]"
echo ""
echo " on Re-enable sleep when the lid is closed"
echo " off Prevent sleep when the lid is closed"
@ElijahLynn
ElijahLynn / thinkpad-fix.md
Created June 28, 2026 04:32
ThinkPad X1 Yoga Gen 7: fix touchpad ghost clicks while typing when using keyd (Arch Linux / GNOME / mutter 50.2)

ThinkPad X1 Yoga Gen 7 — Touchpad ghost clicks while typing

OS: Arch Linux
DE: GNOME on Wayland
Symptom: Cursor jumps / ghost clicks while typing, palm touches registering during typing

What triggered it

This started after upgrading on 2026-06-27:

@ElijahLynn
ElijahLynn / gpu_pmu_sampler.py
Created June 27, 2026 05:09
Warp GPU A/B test harness (i915 PMU + ydotool, native Wayland)
#!/usr/bin/env python3
"""
Whole-GPU utilization sampler via the i915 PMU -- the same source btop and
intel_gpu_top use. Reads per-engine `*-busy` perf counters (nanoseconds the
engine was busy) and normalizes by PERF_FORMAT_TOTAL_TIME_ENABLED:
engine_util% = delta(busy_ns) / delta(time_enabled_ns) * 100
This measures the GPU system-wide (pid=-1), so it includes warp's rendering
AND the GNOME compositor compositing warp's frames -- matching btop.
@ElijahLynn
ElijahLynn / fix-audio
Created June 15, 2026 03:34
Fix Sony XM6 multi-point switching on Arch Linux (PipeWire)
#!/bin/bash
# Script to "kick" Sony XM6 headphones when multi-point switching gets stuck
CARD="bluez_card.80_99_E7_DE_5F_68"
echo "Attempting to reset Bluetooth audio for Eli Beats..."
# 1. Toggle profile to "off" and back to "a2dp-sink"
# This usually forces the transport to re-handshake without a full disconnect
echo "-> Resetting profile..."
@ElijahLynn
ElijahLynn / cursor-python-ansible-extensions.md
Created June 8, 2026 21:59
Cursor: Python + Ansible extension compatibility fix (PET binary, pinned Python 2024.20.0)

Cursor: Python + Ansible Extension Compatibility

Notes for fixing extension activation failures and Python environment warnings when using Ansible 26.6+, Python Environments, and ms-python.python in Cursor on macOS.

Tested on Cursor ~1.105 (VS Code 1.105 base), macOS arm64, June 2026.

Symptoms

  • Notification: "Extension activation failed" — root cause is usually ms-python.python
@ElijahLynn
ElijahLynn / 00-summary.md
Last active June 8, 2026 02:27
Ralph Wiggum Loop: Claude Code xhigh vs low effort comparison

Ralph Wiggum Loop: xhigh vs low effort comparison

Testing the Claude Code agentic loop (claude -p --dangerously-skip-permissions) building a small Python CLI from scratch, with two effort levels compared.

Setup

  • App: Ralph Wiggum Quotes CLI — random, list, add, delete subcommands, stdlib only
  • Loop: while grep -q '\- \[ \]' implementation_plan.md — one task per iteration, auto-terminates
  • Branches: main (xhigh/default effort) vs no-thinking (--effort low)
@ElijahLynn
ElijahLynn / gist:73d7d72c2edd1cf5baa32f78fa5496de
Created June 7, 2026 01:25
rebind touch screen - x1 yoga , arch linux + gnome (sometimes it stops working)
dconf reset -f /org/gnome/desktop/peripherals/tablets/056a:52b5/
echo i2c-WACF2200:00 | sudo tee /sys/bus/i2c/drivers/i2c_hid_acpi/unbind
echo i2c-WACF2200:00 | sudo tee /sys/bus/i2c/drivers/i2c_hid_acpi/bind

How to format strings as code w/keyboard shortcuts in various tools:

Slack

  • inline - cmd + shift + c
  • block - cmd + shift + e
  • select any code block, triple click it

GitHub issues and comments - w/Refined GitHub Extension

  • inline - double click to highlight the string, then press ` to wrap in backticks
  • block - ??
@ElijahLynn
ElijahLynn / README.md
Last active November 13, 2025 22:06
GitHub notification spam remover script by bejamincburns
@ElijahLynn
ElijahLynn / fingerprint-sudo-mac.md
Last active September 15, 2025 23:00
fingerprint sudo on mac

TIL: For a consistent fingerprint auth experience on Mac, for both GUI and CLI, I learned that I can add this snippet to the top of /etc/pam.d/sudo:

auth       sufficient     pam_tid.so

and now everytime I get a password prompt, I instead get a fingerprint popup modal. Saves a ton of time if you have a longer password.