Skip to content

Instantly share code, notes, and snippets.


  • New York, NY
Block or report user

Report or block satmandu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
satmandu /
Created Jan 9, 2020
set overlay on so that everything mounts at boot
for f in `sudo zfs list -H| awk '{print $1}'`; do sudo zfs set overlay=on "$f" ; done
satmandu /
Last active Nov 20, 2019
Alternative non-bpool/rpool zpool mount service for ubuntu 19.10
#!/bin/bash -e
#export PS4='+(${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
# Place in /usr/local/sbin/
USAGE="Usage: $0 zpool1 zpool2 zpool3 ... zpoolN"
if [ "$#" == "0" ]; then
echo "$USAGE"
exit 0
#!/bin/bash -ex
# Hack to add user USERDATA zpool to an Ubuntu 19.10 system.
# I have this at /usr/local/bin/
[[ -n "$user" ]] || (echo "User not specified." && exit 1)
zfs_user_suffix=$(mount | grep rpool/USERDATA/root_ | awk '{print $1}' | sed 's/rpool\/USERDATA\/root_//')
[[ -n "$zfs_user_suffix" ]] || (echo "Can't get Ubuntu ZFS user suffix." && exit 1)
zfs_system_suffix=$(mount | grep rpool/ROOT/ubuntu_ | awk '{print $1}' | head -1 | sed 's/rpool\/ROOT\/ubuntu_//')
[[ -n "$zfs_system_suffix" ]] || (echo "Can't get Ubuntu ZFS system suffix." && exit 1)
satmandu / build-arm64-eoan-rpi4
Last active Jul 25, 2019
Building eoan image for Raspberry Pi 4B
View build-arm64-eoan-rpi4
-v /dev:/dev --privileged
xzcat eoan-preinstalled-server-arm64+raspi3.img.xz > eoan-preinstalled-server-arm64+raspi4.img
kpartx -av eoan-preinstalled-server-arm64+raspi4.img
mount /dev/mapper/loop0p2 /mnt
mount /dev/mapper/loop0p1 /mnt/boot/firmware
git clone --depth=1
satmandu /
Last active Jul 13, 2019 — forked from telenieko/
Sample files to enable wireless on Debian initramfs
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless
echo "$PREREQ"
case $1 in
# ***Note*** You need machinectl installed.
# This can be found in the systemd-container package on Ubuntu!
# Place this script in /lib/systemd/system-sleep/
# Then run: sudo chmod +x /lib/systemd/system-sleep/
# This works around the wallpaper corruption on resume from suspend with Nvidia GPUs
# reported at
# and due to this feature of the Nvidia driver:
satmandu / before-dkms-ubuntu-mainline
Last active Jul 10, 2019
Workaround for ubuntu mainline kernel cross-compile issues with module building files compiled in wrong architecture
View before-dkms-ubuntu-mainline
# This should go in /etc/kernel/header_postinst.d
files=("scripts/recordmcount" "scripts/mod/modpost" \
satmandu / gist:3fd42c5a538bc34a1636950740838d3e
Created Apr 12, 2019
Waveshare35a config info for raspberry pi
View gist:3fd42c5a538bc34a1636950740838d3e
Raspberry Pi - Rotate the screen display
Raspberry Pi 2.4/3.2 inch LCD
Rotate display
sudo nano /boot/config.txt
View ocr
if [ "$1" != "" ]; then
nice -20 ocrmypdf --redo-ocr --pdfa-image-compression lossless --output-type pdfa-2 "$1" "$1"
echo "No filename given"
View gist:8a19a4ffb60a96d14716defc535ae8bf
sudo apt update
sudo apt-get install -y bc build-essential gcc-aarch64-linux-gnu git unzip subversion
mkdir rpi ; cd rpi
# to get head, aka most actively developed current rpi kernel tree
git clone --depth=1
# for specific version use: git clone --depth=1 -b rpi-4.14.y
# Now we get updated rpi firmware
svn export
rm boot/config.txt
rm boot/kernel*
You can’t perform that action at this time.