Skip to content

Instantly share code, notes, and snippets.

@marhensa
marhensa / wsl2-debian.md
Last active November 8, 2026 01:57
Debian on WSL2 Setup & Configuration Guide: Rootless Docker, NVIDIA Container Toolkit, Developer Setup

Debian on WSL2 Setup & Configuration Guide: Rootless Docker, NVIDIA Container Toolkit, Developer Setup

This guide provides a modular, step-by-step workflow to install Debian on WSL2, configure Rootless Docker Engine, and optionally integrate the NVIDIA Container Toolkit for GPU acceleration if your host machine has an NVIDIA GPU.

Important

Before you start

  • Windows 11 with WSL 2.4.4 or newer (wsl --version).

  • VS Code installed on Windows if you want code .. Install the WSL extension from a Windows terminal:

@marhensa
marhensa / emodipt-extend.omp.json
Last active November 7, 2026 13:47
emodipt-extend.omp.json with venv and python information
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#E5C07B",
"options": {
@marhensa
marhensa / vscode-wsl2-native.md
Created October 28, 2026 06:56
Running Native Linux VS Code in WSL2 (Debian Trixie)

Complete Guide: Running Native Linux VS Code in WSL2 (Debian Trixie)

A step-by-step tutorial for setting up the native Linux build of Visual Studio Code inside WSL2 without relying on Windows /mnt/c mounts, fixing mouse cursor offsets, subpixel font rendering, browser authentication, and HiDPI scaling.


1. Prerequisites & Dependencies

Debian minimal WSL images lack standard GUI libraries, archive tools, and font caches. Install the base system utilities and GUI runtime libraries first:

@marhensa
marhensa / update-apps.ps1
Last active October 12, 2026 05:20
ArtCraft Downloader and Updater
$ErrorActionPreference = "Stop"
# Header banner
Write-Host ""
Write-Host "╭──────────────────────────────────────────────────╮" -ForegroundColor Magenta
Write-Host "│ ⚡ ArtCraft Updater (Windows Portable) │" -ForegroundColor Magenta
Write-Host "╰──────────────────────────────────────────────────╯" -ForegroundColor Magenta
Write-Host ""
$apps = @(
@marhensa
marhensa / windows-11-25H2-local-account-workaround.md
Last active August 7, 2026 19:02
Windows 11 25H2 Local Account Workaround (Proper)

Windows 11 25H2 Local Account Workaround (Proper)

After installing Windows to a partition and then after the automatic reboot:

When the installation screen shows "Is this the right country or region?" press: Shift + F10

In the Command Prompt, type the following commands:

(change vboxuser to your username)

@marhensa
marhensa / debian-wsl2-docker-nvidia-container-toolkit.md
Last active November 6, 2025 06:55
WSL2 Manual Docker Rootless with Nvidia Container Toolkit Enabled
# it's typed on Powershell
wsl --install Debian --name debian --web-download --location "D:\WSL\debian" --no-launch
wsl -d debian

Enter new username and password

# now it's inside WSL2 bash
@marhensa
marhensa / fedora42-workstation-post-install.md
Last active August 17, 2025 04:08
Fedora 42 Workstation Post-Installation

Fedora 42 Workstation (GNOME 48) Post-Installation

Various post-installation tasks for a Fedora 42 Workstation setup using GNOME 48, an Nvidia GPU, and Wayland session.

Set the Boot Order (for Dual Boot) and fix the blurry GRUB

# Use lsblk to find Windows EFI partition, note that, 
# this case it's /dev/nvme0n1p1
lsblk
sudo nano /etc/default/grub
@marhensa
marhensa / mount-unmount-bitlocker-ubuntu-debian.sh
Last active June 1, 2025 06:04
Mount and Unmount BitLocker Drive from Linux (Debian/Ubuntu Based)
# Disable Fast Startup in Windows (CRITICAL for read-write access & NTFS health)
# In Windows: Control Panel -> Power Options -> "Choose what the power buttons do"
# -> "Change settings that are currently unavailable" -> (UN)check "Turn on fast startup".
#
# If not doing that (i.e., if Fast Startup is LEFT ON), please restart Windows (not just shutdown),
# because in contrary, Windows shutdown with Fast Startup ON is not "clean"
# and possibly dangerous to use partition in this state on another machine.
# TL;DR: if Fast Startup is ON, then before accessing drives in Linux for read-write, use Restart from Windows.
# Restarting from Windows to Linux is a safe alternative to get a clean filesystem state.
# If Fast Startup is OFF, then a normal "Shut down" is also fine.

apt-get update -y

wget -qO- https://astral.sh/uv/install.sh | sh

source $HOME/.local/bin/env

alias pip='uv pip' && source ~/.bashrc

uv python install 3.12

@marhensa
marhensa / full-guide-wsl-docker-segment-geospatial-gpu-pixienv.sh
Last active May 23, 2025 15:20
full-guide-wsl-docker-segment-geospatial-gpu-pixienv
###### WSL2 DEBIAN SETUP #####
# wsl --install Debian
# wsluser
# password
echo cd ~ >> ~/.bashrc && source ~/.bashrc
sudo nano /etc/wsl.conf
```wsl.conf
[boot]