Skip to content

Instantly share code, notes, and snippets.

@davidquicast
davidquicast / gist:563c7a92af8da9d911b4f358858d8504
Last active December 17, 2025 09:17
Shrink WSL2 and Docker Virtual Disks to Reclaim Disk Space

Shrink WSL2 and Docker Virtual Disks to Reclaim Disk Space

Over time, WSL2 distributions and Docker images can consume significant disk space. Even after deleting files, the allocated virtual disk (VHDX) does not automatically shrink. This guide explains how to manually reclaim disk space by optimizing the virtual disk.

Shrinking WSL2 Virtual Disks

Locate the VHDX File

On Windows 11, WSL2 distributions store their virtual disks in the following location:

@Argon42
Argon42 / unicode range.md
Last active October 20, 2025 14:13
Диапазоны юникод символов для языков

Расположение шрифтов языков в Unicode блоках

  • Basic Latin U+0000..U+007F (128 символов)
    • Английский алфавит
    • Датский алфавит
  • Basic Latin U+0000..U+007F, Latin-1 Supplement U+0080..U+00FF (256 символов)
    • Немецкий алфавит
    • Французский алфавит
    • Испанский алфавит
    • Итальянский алфавит
  • Португальский алфавит
@milnak
milnak / usb-device-events.md
Last active December 28, 2025 21:31
How to monitor USB device events in Windows #windows

How to monitor USB device events in Windows

Enable event log

Open Event Viewer.

Navigate to: Application and Services Logs > Microsoft > Windows > DriverFrameworks-UserMode > Operational

Right click, check "Enable logging", then click OK

@utlandr
utlandr / biqu_microprobe.cfg
Last active September 4, 2025 23:13
Klipper probe config for the BIQU Microprobe (V1/V2)
## --- BIQU Microprobe Klipper configuration ---
# Not much different from a standard probe config. The
# main difference compared to most probes is to disable
# deactivating the probe (PROBE_UP) after each sample
#
# You can either copy pasta this directly or import
# into your config.yml using [include microprobe.cfg]
#
# Note: if you are changing from a bltouch or one of its
# clones, remove/comment out the [bltouch] config!
@cmidgley
cmidgley / voron_24_printed_parts.md
Last active March 18, 2026 17:26
Printed parts list for the Voron 2.4 organized by assembly order

Voron 2.4 Printed Parts List

List of parts to print for Voron 2.4 organized by the Assembly Manuals order of assembly, allowing for just-in-time printing of parts while building the printer. Configuration is standard Voron 2.4 (Afterburner Direct Feed, DIN rail mounts) with choices for E3D, Dragon or Mosquito hot ends on a 250mm, 300mm or 350mm frame. No parts for the drag chain are included, as often these are purchased parts rather than printed.

Names of the sections (such as Gantry/X_Axis/XY Joints) match the name of the STL directory that contains the prints. Note that Voron Design uses filenames starting with [a]_ at the start of a filename to indicate parts that can be printed in an accent color.

_Credit to krobertson for maki

@Davidblkx
Davidblkx / LevenshteinDistance.cs
Created November 10, 2016 17:45
Levenshtein Distance in c#
using System;
namespace Algorithms
{
public static class LevenshteinDistance
{
/// <summary>
/// Calculate the difference between 2 strings using the Levenshtein distance algorithm
/// </summary>
/// <param name="source1">First string</param>
@danielbachhuber
danielbachhuber / collection-filter.js
Last active January 29, 2025 04:58
Add a custom taxonomy dropdown filter to the WordPress Media Library
(function(){
/**
* Create a new MediaLibraryTaxonomyFilter we later will instantiate
*/
var MediaLibraryTaxonomyFilter = wp.media.view.AttachmentFilters.extend({
id: 'media-attachment-taxonomy-filter',
createFilters: function() {
var filters = {};
// Formats the 'terms' we've included via wp_localize_script()