Skip to content

Instantly share code, notes, and snippets.

View drewdomi's full-sized avatar
😝
Bleh

Andrew Domingues drewdomi

😝
Bleh
View GitHub Profile

Documentation: Gemini Custom Instructions Optimization

1. Implementation Order

To ensure the logic flows correctly, paste the parts in this sequence into your Gemini settings boxes. Since most interfaces provide two boxes, follow this combination:

  • Box 1 (Context/About You): Paste Part 1.
  • Box 2 (How to Respond): Paste Part 2 immediately followed by Part 3 (ensure no extra spaces are added between them).
    • Note: If Box 2 rejects the combined text, it means the combined encoded length is over 1,500. In that case, move the end of Part 2 into Box 1.

Shrinking a QCOW2 Image with LUKS Encryption

Problem

Running qemu-img convert -O qcow2 -c alone does not reduce image size when the guest uses LUKS encryption. LUKS encrypts all blocks — including free space — making them appear allocated to the host. TRIM signals must pass through the full stack: guest → LUKS → virtio-disk → qcow2.


Environment

How to Restore a Virtual Machine in virt-manager/virsh

This guide covers the complete restoration process for a KVM/QEMU virtual machine using libvirt (virt-manager/virsh) from backup files.


Prerequisites

Required backup files:

  • vm-disk. qcow2 — Virtual machine disk image

AI Instructions 2.1: Technical Advisor (Andrew Domingues)

1. Core Persona & Stance

  • Role: High-level Technical Advisor. Critical, direct, and results-oriented.
  • Tone: No praise, no smoothing, no comfort. Sharp, professional, and strictly factual.
  • Validation: Verify all claims. Question assumptions, challenge weak reasoning, and explicitly expose blind spots, self-deception, or opportunity costs.
  • Output: Do not deliver unverified or unrealistic solutions. If data is missing, state it clearly and flag risks. Prioritize facts over assumptions, no mistakes.
  • Strict Objectivity: Critiques must be strictly directed at the code, architecture, or logic. Never evaluate the user's skill level, intelligence, or status. Do not use condescending, moralizing, or gatekeeping phrases (e.g., "For a professional...", "As a high-level student..."). Stick exclusively to resolving the technical facts without personal judgments.

AI Instructions — Andrew Domingues

General Stance

  • Act as a high-level advisor: critical, direct.
  • Validate claims and conclusions; do not deliver anything unverified or unrealistic.
  • Question assumptions, challenge reasoning, expose blind spots.

Communication

  • If reasoning is weak, say why.
  • Call out self-deception, omissions, and excuses explicitly.

Fingerprint Reader Setup on Linux - Synaptics Sensors

Complete guide for configuring Synaptics fingerprint readers (including Metallica MIS Touch) on Linux distributions using python-validity and fprintd.

Device Compatibility

This guide specifically covers Synaptics fingerprint sensors that require proprietary drivers:

  • Synaptics Metallica MIS Touch (06cb:009a)
  • Synaptics Prometheus (06cb:0081)

PipeWire Restart Guide - Arch Linux

Quick reference for restarting PipeWire audio services without logging out.

Quick Fix - Restart PipeWire Services

# Stop all PipeWire services
systemctl --user stop pipewire pipewire-pulse wireplumber

How to Remove Specific Strings and Files from Commit History Using BFG Repo-Cleaner

This guide explains how to use BFG Repo-Cleaner to rewrite your Git repository's history to remove sensitive data (like passwords, API keys, or IP addresses) and unwanted files. This is extremely useful for cleaning up your repository before making it public or sharing with others.


⚠️ Prerequisites & Warnings

  • Backup your repository before running BFG. History rewriting is destructive.
  • Coordinate with collaborators. All contributors will need to re-clone the repository after the rewrite and force-push.
  • Use on a fresh clone or bare repo for best results.