Skip to content

Instantly share code, notes, and snippets.

View aj-ats's full-sized avatar
🏭
working

0xAJ aj-ats

🏭
working
View GitHub Profile
@ctrlMarcio
ctrlMarcio / Compact-WSLVHD.ps1
Created May 29, 2025 21:31
PowerShell script to compact the VHDX file of a WSL2 distribution to reclaim disk space on Windows. Requires manual update of the VHDX path and running as Administrator.
# Script to compact the VHDX for a WSL distribution (e.g., ext4.vhdx)
#
# WHY: WSL2 VHDX files grow dynamically but don't shrink automatically when files
# are deleted within the Linux environment. This script helps reclaim that space.
#
# USAGE:
# 1. (Optional but Recommended) Clean up files inside your WSL distro first.
# From within WSL:
# sudo apt-get update && sudo apt-get upgrade -y
# sudo apt-get autoremove -y && sudo apt-get autoclean -y
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a