Skip to content

Instantly share code, notes, and snippets.

View denji's full-sized avatar
🇺🇦

Denys Denysov denji

🇺🇦
View GitHub Profile
@denji
denji / README.md
Created November 3, 2026 14:20
Windows 11 26H2 in-place upgrade compatibility helper for unsupported lab VMs. Configures HwReqChkVars, MoSetup and LabConfig registry overrides, detects actual guest RAM and optionally clears cached Windows Setup compatibility data.

Windows 11 26H2 — In-Place Upgrade Compatibility Helper

A lightweight PowerShell utility for preparing Windows 11 in-place upgrades on unsupported hardware configurations, particularly VMware virtual machines without a virtual TPM.

The script configures several registry-based compatibility overrides used by Windows Setup. It does not modify installation media, patch Setup binaries, emulate TPM hardware or change the virtual machine configuration.

Warning

This is an unofficial compatibility workaround. Microsoft does not support installing Windows 11 on hardware that does not meet its minimum requirements. An upgrade is not guaranteed to succeed, and unsupported devices are not guaranteed to receive updates.

Features

@denji
denji / MYSQL-MARIADB-BACKUP-RESTORE-GUIDE.md
Last active October 21, 2026 21:35
MySQL & MariaDB Backup & Restore Guide

MySQL & MariaDB Backup & Restore Guide

A practical field guide to complete logical backups, parallel dump/load, utf8mb4, and restore validation.

Covers Oracle MySQL tools (mysqldump / mysql and MySQL Shell), MyDumper/MyLoader, and Percona XtraBackup.

Last reviewed: 22 October 2026 · Format: GitHub Gist / Markdown · Scope: Version-dependent MySQL-compatible workflows

Important

A backup is not proven until it has been restored and checked. Test these examples on a staging system first. Only restore SQL files you trust: their statements execute with the privileges of the connected account.

@denji
denji / README.md
Last active October 20, 2026 11:21
Automatic SSH Signing Git — GitHub, Gists, AUR & GitLab

Secure SSH & Automatic Git Signing

GitHub, Gists, GitLab and Arch Linux AUR

A secure, low-maintenance OpenSSH and Git configuration with automatic Ed25519 signing, provider-specific identities, verified host keys, and connection multiplexing.

Target environment: OpenSSH 10.6p1, OpenSSL 3.6.5, modern Git.

Design principles

@denji
denji / cleanup_workflow_runs.sh
Last active October 16, 2026 03:58
GitHub Actions Cleanup - Bash utility to purge completed workflow runs with pagination, smart rate-limit handling, retries, and dry-run support.
#!/usr/bin/env bash
set -euo pipefail
#
# GitHub Actions Workflow Runs Cleanup
# ------------------------------------
# Delete GitHub Actions workflow runs from ONE repository. Optionally limit
# deletion to ONE workflow, workflow lifecycle state, run status, and/or
# conclusion. WORKFLOW is OPTIONAL: runs can outlive their workflow YAML file.
#
# Uses pagination, snapshot-before-deletion, sequential deletion, retries,
@denji
denji / ghcr_registry_purge_images.sh
Last active October 16, 2026 01:53
GHCR Cleanup (GitHub Container Registry) - Bash utility to purge tagged, untagged, or all container image versions with pagination, smart rate-limit handling, retries, and dry-run support.
#!/usr/bin/env bash
set -euo pipefail
#
# GitHub Container Registry (GHCR) Cleanup
# ----------------------------------------
# Delete package versions from ONE organization-owned GHCR container.
# Uses pagination, sequential deletion, HTTP-aware retries, rate-limit
# handling, and an interactive progress bar with a final summary.
#
# Requirements:
@denji
denji / VMware-Linux-ZFS-Compact.md
Last active November 3, 2026 14:53
Optimizing and Compacting VMware .vmdk Disks on Linux and ZFS

Reclaiming Space from VMware Workstation VMDKs on a Linux Host with ZFS

Deleting files inside a virtual machine frees space in the guest filesystem, but it does not necessarily release the corresponding storage on the host. A growable VMware virtual disk can therefore remain much larger than the guest's current data usage.

This guide covers zero-filling unused guest filesystem space and compacting a growable VMDK with VMware Workstation Pro on a Linux host. It also explains how ZFS affects the result, with brief compatibility notes for TRIM/UNMAP and ESXi.

Compaction reduces host storage consumption. It does not reduce the virtual disk's configured capacity or resize guest partitions.

Scope and prerequisites

@denji
denji / LOGITECH_G502X_GUIDE.md
Last active August 20, 2026 16:08
Logitech G502 X Master Configuration & Troubleshooting Guide

Logitech G502 X Master Configuration & Troubleshooting Guide

The Logitech G502 X features LIGHTFORCE hybrid optical-mechanical switches, a dual-mode scroll wheel, and 13 programmable controls. This guide covers default factory mappings, DPI mechanics, middle-click optimization, software choices, and hardware recovery routines.

Default Out-of-the-Box Layout

Control Physical Location Default Factory Function
G1 (LMB) Main Left Primary Click
G2 (RMB) Main Right Context Menu / Secondary Click
@denji
denji / vmx_sort.py
Last active October 14, 2026 21:26
vmx_sort.py — Diff-optimized VMware .vmx parser and formatter.
#!/usr/bin/env python3
"""Sort VMware .vmx assignments into stable, human-readable groups.
VMware may reorder .vmx assignments when the VM is opened or edited in its GUI.
This formatter restores a deterministic layout without changing the raw bytes of
individual values. Existing comments are discarded because, after reordering,
they cannot reliably be associated with their original assignments.
By default, each non-empty group has an explanatory heading and is separated
from the previous group by one blank line. The --no-comments / --compact option
@denji
denji / vmx_documentation.md
Last active November 4, 2026 17:56
VMware/ESXi .vmx Configuration Parameters

VMware VMX Configuration Parameters — Reference

⚠️ USE AT YOUR OWN RISK
Most parameters listed here are undocumented and unsupported by VMware/Broadcom.
Always back up your .vmx file before editing. Test in non-production environments first.
Parameter availability depends on VMware product version, host OS, and virtualHW.version.


Table of Contents

@denji
denji / gigabyte-x470-gaming-7-sensors.sh
Created July 1, 2024 00:13 — forked from nijave/gigabyte-x470-gaming-7-sensors.sh
Setup sensors for Gigabyte X470 Gaming 7 w/ Fedora
#!/bin/sh
# The chip info can be found via sensors-detect in lm_sensors
# Driver `to-be-written':
# * ISA bus, address 0xa40
# Chip `ITE IT8686E Super IO Sensors' (confidence: 9)
# Driver `it87':
# * ISA bus, address 0xa60
# Chip `ITE IT8792E Super IO Sensors' (confidence: 9)