Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am caerostris on github.
* I am caerostris (https://keybase.io/caerostris) on keybase.
* I have a public key ASCFM0ot7mHnhQyDcuL_NBjSSS_0zzl_hnHCWS-aWXntOAo
To claim this, I am signing this object:
@Caerostris
Caerostris / luks.md
Last active September 6, 2015 15:15

KVM / Xen VPS full disk encryption done right

# Install Ubuntu over SSH

At the moment, your only way to run the Ubuntu installation is via VNC. However, VNC is completely unencrypted. If you transmit your encryption password via VNC, you might just as well not encrypt your server.
In order to perform the installation securely, we need to run the installation via SSH.

Starting the installation via SSH

Boot your server from the Ubuntu Server installation disk. Press F6 in the boot menu and activate expert mode.

@Caerostris
Caerostris / register-shortcut.sh
Created August 26, 2014 07:11
This is a bash script for Ubuntu which registers a keyboard shortcut.
#!/bin/bash
if [ "$#" -ne 3 ]; then
echo "Usage: $0 name command binding"
echo "Example: $0 \"screenshot\" \"gnome-screenshot\" \"<Primary><Alt>s\""
exit
fi
GSETTINGS_PATH="org.gnome.settings-daemon.plugins.media-keys"
KEY_PATH="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"
# Sexy Solarized Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Customized for the Solarized color scheme by Sean O'Neil
# Edited by Caerostris: Fixed for my Ubuntu installation & git version, new prompt
# Preview: https://www.dropbox.com/s/p9jaqroqumcoivr/bash_prompt.png
export TERM="xterm-256color"
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then TERM=gnome-256color; fi
if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then