Skip to content

Instantly share code, notes, and snippets.

View ppartarr's full-sized avatar
🏠
Working from home

Philippe Partarrieu ppartarr

🏠
Working from home
View GitHub Profile
@ppartarr
ppartarr / lxd-reset.sh
Created December 1, 2020 12:11
Reset LXD
#!/usr/bin/env bash
set -euo pipefail # -> http://redsymbol.net/articles/unofficial-bash-strict-mode/
# Reverse what lxd init does
function check_distro() {
local distro=$(grep 'DISTRIB_CODENAME' /etc/lsb-release | cut -d '=' -f 2)
echo "$distro"
@ppartarr
ppartarr / reinstall-grub.sh
Created March 5, 2021 08:24
Reinstall grub after Windows updates (Arch & Windows dual boot)
#!/usr/bin/env bash
# mount the boot partition
mount /dev/nvme0n1p9 /mnt
mount /dev/nvme0n1p7 /mnt/boot
# change root to /mnt partition
arch-chroot /mnt
# reinstall grub