Skip to content

Instantly share code, notes, and snippets.

View denji's full-sized avatar
🇺🇦

Denys Denysov denji

🇺🇦
View GitHub Profile
@denji
denji / VMware-Linux-ZFS-Compact.md
Last active September 24, 2026 01:15
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 August 4, 2026 11:21
vmx_sort.py — Diff-optimized VMware .vmx parser and formatter.
#!/usr/bin/env python3
"""
vmx_sort.py — Diff-optimized VMware .vmx parser and formatter.
"""
import re
import sys
from collections import OrderedDict
LINE_RE = re.compile(r'^\s*([^\s=]+)\s*=\s*(.*?)\s*$')
@denji
denji / vmx_documentation.md
Last active October 2, 2026 19:06
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)
@denji
denji / NUMA node problem.md
Created May 7, 2024 01:25 — forked from zrruziev/NUMA node problem.md
Fixing "successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero" problem

What is NUMA (Non-Uniformed Memory Access)

Non-Uniform Memory Access (NUMA) is one of the computer memory design methods used in multiprocessor systems, and the time to access the memory varies depending on the relative position between the memory and the processor. In the NUMA architecture, when a processor accesses its local memory, it is faster than when it accesses the remote memory. Remote memory refers to memory that is connected to another processor, and local memory refers to memory that is connected to its own processor. In other words, it is a technology to increase memory access efficiency while using multiple processors on one motherboard. When a specific processor runs out of memory, it monopolizes the bus by itself, so other processors have to play. , and designate 'access only here', and call it a NUMA node.

1. Check Nodes

lspci | grep -i nvidia
  
01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2060 12GB] (rev a1)
@denji
denji / bash_strict_mode.md
Created April 14, 2024 17:44 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@denji
denji / git-cheatsheet.md
Last active November 9, 2025 18:06 — forked from jeremypage/git-cheatsheet.md
Git cheatsheet

Git cheatsheet

Find all instances of text in all commits

git grep "text to look for" $(git rev-list --all)

List commit messages since given commit

@denji
denji / readme.md
Created June 4, 2023 20:35 — forked from ShannonScott/readme.md
[Moving efficiently in the CLI] Key-combination reference for movement in the shell. #tags: mac, linux, bash