Skip to content

Instantly share code, notes, and snippets.

andyrbell / mount_luks.txt
Last active Mar 10, 2019
Mount LUKS encrypted LVM split across disks / partitions
View mount_luks.txt
luks encrypted lvm across two disks / partitions
/dev/sda3 and /dev/sdb1
1. open encrypted parts
cryptsetup luksOpen /dev/sda3 crypt1
(enter pass)
cryptsetup luksOpen /dev/sdb1 crypt2
andyrbell /
Last active Mar 31, 2019
Prevent gnome intercepting some shortcuts used by intellij
# disable Alt+` in gnome which is used for the VCS Operations Popup in intellij
gsettings set org.gnome.desktop.wm.keybindings switch-group "['disabled']"
# disable Ctrl+Alt+Shift+Down and Ctrl+Alt+Shift+Up
# which are used for Next / Previous VCS change in intellij
# not sure if this one works yet but Ctrl+Alt+Shift+Super+Up/Down seems to even though
# intellij makes no mention of the super key in the keymap...
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['disabled']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['disabled']"
andyrbell /
Last active Apr 19, 2021
Sort docker images by size desc
docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | sed 's/ //' | sort -h -r | column -t
andyrbell / luks_backup.txt
Created Mar 10, 2019
clonezilla luks backup
View luks_backup.txt
backup luks partition
1. Boot clonezilla
2. Drop into the command line
3. open the encrypted external drive partition
cryptsetup luksOpen /dev/sda3 backup
andyrbell /
Last active Sep 24, 2021
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf