Skip to content

Instantly share code, notes, and snippets.

@andyrbell
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
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
andyrbell / disable-gnome-shortcuts-overriding-intellij.sh
Last active Mar 31, 2019
Prevent gnome intercepting some shortcuts used by intellij
View disable-gnome-shortcuts-overriding-intellij.sh
# 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
andyrbell / scanner.sh
Last active Jul 19, 2021
Make a pdf look scanned using ImageMagick
View scanner.sh
# 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
@andyrbell
andyrbell / docker-image-size.sh
Last active Apr 19, 2021
Sort docker images by size desc
View docker-image-size.sh
#!/bin/sh
docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | sed 's/ //' | sort -h -r | column -t