Skip to content

Instantly share code, notes, and snippets.

@GiovanniGrieco
GiovanniGrieco / podman_on_wsl2.md
Last active March 3, 2025 13:44
Install Podman on WSL2

Install Podman on Windows Subsystem for Linux 2 (WSL2)

This guide allows a safe and rootless installation of Podman on WSL2. Head over the hyperlinks to discover more about these two wonderful technologies!

This guide assumes that Debian 11 "bullseye" is installed as WSL2 base OS. To do it, simply open your Windows Powershell console under Admin rights and run

PS> wsl install -d Debian

After installation, please check that you are under the latest Debian. If not, please upgrade it.

@davidar
davidar / fix-app-icons.sh
Created August 13, 2016 06:03
Fix Chrome App icons in the KDE launcher
#!/bin/bash
# http://superuser.com/a/1068709/55113
for file in ~/.local/share/applications/*.desktop; do
CLASS="`grep '^StartupWMClass=' "$file" | cut -d= -f2`"
if [ -n "$CLASS" ] && ! grep -q xdotool "$file"; then
EXEC="`grep '^Exec=' "$file"`"
EXEC="$EXEC \\&\\& xdotool search --sync --classname $CLASS set_window --class $CLASS"
sed -i~ "s!^Exec=.*!$EXEC!" "$file"
fi
done
@larsch
larsch / create-arch-image-raspberry-pi-2.sh
Last active March 11, 2024 13:55
Shell script that creates a Arch Linux image for the Raspberry Pi 2. Downloads the latest distribution from archlinuxarm.org and creates the flash filesystems including boot partition. Partitions are aligned for typical SD cards and ext filesystem tuned accordingly.
#!/bin/sh -ex
losetup /dev/loop0 && exit 1 || true
image=arch-linux-$(date +%Y%m%d).img
wget -q -N http://archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
truncate -s 1G $image
losetup /dev/loop0 $image
parted -s /dev/loop0 mklabel msdos
parted -s /dev/loop0 unit s mkpart primary fat32 -- 1 65535
parted -s /dev/loop0 set 1 boot on
parted -s /dev/loop0 unit s mkpart primary ext2 -- 65536 -1