Skip to content

Instantly share code, notes, and snippets.

@marhensa
marhensa / fedora42-workstation-post-install.md
Last active May 17, 2025 01:37
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.

Initial System Setup

# Firmware Updates
sudo fwupdmgr refresh --force
sudo fwupdmgr get-updates
@marhensa
marhensa / mount-unmount-bitlocker-ubuntu-debian.sh
Last active May 12, 2025 08:29
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 January 16, 2025 22:08
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]
@marhensa
marhensa / compacting-vhdx
Last active August 28, 2023 18:34
Compacting Virtual HD of WSL (VHDX)
# Without Hyper-V Enabled
# Powershell (As Administrator)
wsl --shutdown
diskpart
# Diskpart Compacting Operations
select vdisk file="E:\LABS\DockerWSL\docker-desktop-data\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
@marhensa
marhensa / clearall.sh
Last active August 28, 2023 18:21
Bash Linux - clear screen and clear all bash histories and back to home folder
history -c && history -w && clear && cd ~
@marhensa
marhensa / gitpullall.sh
Last active August 28, 2023 18:24
Bash Linux - git pull for all directories (update all repository folders)
ls -R -d */.git | cut -d'.' -f1 | xargs -P10 -I{} git -C {} pull
# make sure to run it on the folder that have all those repositories that needs to be updated
@marhensa
marhensa / gitpullall.ps1
Last active August 28, 2023 18:24
PowerShell - git pull for all directories (update all repository folders)
Get-ChildItem -Directory -Force -Recurse -Filter ".git" -Depth 1 | ForEach-Object {$currentLocation = Get-Location; Set-Location -Path $_.Parent.FullName; Write-Host $_.Parent.FullName; git pull; Set-Location -Path $currentLocation}
# make sure to run it on the folder that have all those repositories that needs to be updated