Skip to content

Instantly share code, notes, and snippets.

View leggiero's full-sized avatar

Eduardo Leggiero leggiero

View GitHub Profile
@superjamie
superjamie / install-ubuntu-luks-lvm.md
Last active April 8, 2024 21:35
How to install Ubuntu with LUKS Encryption on LVM

How to install Ubuntu with LUKS Encryption on LVM

My work requires us to have full-disk encryption, so these are the steps I use.

The basic idea is to create a LUKS-encrypted partition which is used as an LVM Physical Volume.

The GRUB boot partition isn't encrypted, but everything else is.

These steps tested and working on 22.04 (jammy) and 20.04 (focal).

@ronaldsuwandi
ronaldsuwandi / docker-compose.yml
Created December 22, 2020 05:17
Docker Compose for Jupyter Lab/Notebook (no token/password)
version: "3.9"
services:
jupyter:
image: jupyter/scipy-notebook
ports:
- "8888:8888"
volumes:
- ./notebooks:/home/jovyan/
environment:
@ts1
ts1 / update-dns.sh
Created September 4, 2020 06:04
Dynamic DNS update using AWS Lightsail Domain API
#!/bin/bash
set -eo pipefail
DOMAIN=example.com
ENTRY=examplehost
#LINE_TOKEN=xxxxxx
get_ip() {
curl -s 'https://api.ipify.org'

How many ways can we express "::"

Both IPv4 and IPv6 allow for some flexibility in how IP addresses are expressed as strings, but IPv6 really takes it to the max. How many ways can we express the all-zeroes IPv6 address, a.k.a. "::". Let's see.

The obvious

 ::

Running count: 1.

@ZhangChen199102
ZhangChen199102 / .direnvrc
Last active April 1, 2024 03:48
Setup direnv + pyenv + pyenv-virtualenv
# use a certain pyenv version
use_python() {
if [ -n "$(which pyenv)" ]; then
local pyversion=$1
pyenv local ${pyversion}
fi
}
layout_virtualenv() {
local pyversion=$1
@nupplaphil
nupplaphil / headless-luks-encrypted-debian-server-with-uefi.md
Last active November 16, 2023 15:58 — forked from jkullick/headless-luks-encrypted-ubuntu-server.md
Headless LUKS encrypted Debian Server with UEFI
# stop active raid
mdadm --stop /dev/md[01]

# destroy partition table on hdds
dd if=/dev/zero of=/dev/sda bs=1M count=512
dd if=/dev/zero of=/dev/sdb bs=1M count=512
dd if=/dev/zero of=/dev/sdc bs=1M count=512
dd if=/dev/zero of=/dev/sdd bs=1M count=512
@mandx
mandx / clean_chrome.py
Created July 21, 2017 21:41
Simple Python 3 script to launch a new, clean Chrome instance
from subprocess import run
from tempfile import TemporaryDirectory
if __name__ == '__main__':
with TemporaryDirectory() as tempdir:
run([
'google-chrome',
'--user-data-dir==' + tempdir,
'--incognito',
@erdii
erdii / encrypted-backup-to-s3.md
Created May 12, 2017 19:51
A crude encrypted backup on s3

encrypted backup to s3

init encfs

  • first time mounting with
    • encfs --reverse /path/to/backup /tmp/encrypted-s3-backup
  • i choose this settings:
    • x - expert mode
    • AES encryption - 256 bit keysize
@brablc
brablc / dnsmasq macOS.md
Last active September 24, 2021 10:24 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@cvan
cvan / set-up-chromium-keys.md
Last active March 19, 2024 10:44
Launch Chromium with API Keys on Mac OS X and Windows

Last Updated: March 2023

IMPORTANT: Ignore the out-of-date steps below for getting Chromium keys.

Instead, read this up-to-date guide (Jan 2023) written by @LearningToPi.

P.S. Thank you to every contributor below who provided tips over the years on what should be a straightforward process: setting up Chromium for local development.

Long live the web!