Nothing Special   »   [go: up one dir, main page]

Skip to content

Instantly share code, notes, and snippets.

@andyrbell
andyrbell / luks_backup.txt
Created March 10, 2019 14:35
clonezilla luks backup
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 March 10, 2019 14:32
Mount LUKS encrypted LVM split across disks / partitions
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 March 31, 2019 12:06
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
andyrbell / scanner.sh
Last active November 21, 2024 07:13
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
@andyrbell
andyrbell / docker-image-size.sh
Last active June 3, 2024 16:58
Sort docker images by size desc
#!/bin/sh
docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | sed 's/ //' | sort -h -r | column -t