Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View juangiordana's full-sized avatar

Juan Giordana juangiordana

View GitHub Profile
@juangiordana
juangiordana / git-prompt-homestead.sh
Last active August 15, 2020 21:08
Colored Git prompt for Homestead box.
# https://unix.stackexchange.com/questions/124407/what-color-codes-can-i-use-in-my-ps1-prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[38;5;214m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\] \$\[\033[00m\] '
@juangiordana
juangiordana / sublime-text-php.md
Last active December 5, 2019 19:06
Sublime Text 3 / PHP workflow

PHP

mkdir ~/bin
sudo apt install php-cli php-xml

PS1='\n' # new line
PS1="$PS1"'\[\033[32m\]' # change to green
PS1="$PS1"'\u@\h ' # user@host<space>
PS1="$PS1"'\[\033[35m\]' # change to purple
PS1="$PS1"'$MSYSTEM ' # show MSYSTEM
PS1="$PS1"'\[\033[33m\]' # change to brownish yellow
PS1="$PS1"'\w' # current working directory
PS1="$PS1"'\[\033[36m\]' # change color to cyan
PS1="$PS1"'`__git_ps1`' # bash function
PS1="$PS1"'\[\033[0m\]' # change color
# https://unix.stackexchange.com/questions/124407/what-color-codes-can-i-use-in-my-ps1-prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\] \$\[\033[00m\] '
@juangiordana
juangiordana / dm-crypt.md
Last active September 29, 2023 21:03
Full disk encryption with LVM on top of LUKS.

Full disk encryption with LVM on top of LUKS.

I wanted to explore disk encryption on Linux for a long time now so I decided to give it a try and, after getting some knowledge on the topic, I decided that I wanted to achieve full disk encryption with LVM volumes on top of LUKS so in case the computer is lost not even the partitions layout would be exposed to potential threats.

Since the whole disk will contain encrypted data that the BIOS cannot understand, having a separate device is a requirement for this setup: we need a primary active partition to be available for the BIOS to delegate the boot process to the boot loader.

Benefits:

  • Deniable encryption because the hard drive will only contain unidentifiable encrypted data.
  • A form of two-factor authentication because the LUKS header will be stored on the external device.