Skip to content

Instantly share code, notes, and snippets.

@slivik
slivik / install-ubuntu-luks-lvm.md
Created November 7, 2023 08:14 — forked from superjamie/install-ubuntu-luks-lvm.md
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).

@slivik
slivik / miq-ost-quotas-script.rb
Created April 20, 2020 11:30
Get Openstack quotas (Manage IQ provider)
class OSTquotas
require 'rest-client'
require 'json'
def initialize(project, provider_name="PROVIDER_NAME", provider_url="PROVIDER_URL", admin_project_id="ADMIN_PROJECT_ID")
@provider_name=provider_name
@provider_url=provider_url
@admin_project_id=admin_project_id
@project = project
@slivik
slivik / Keeping_fork_up-to-date.md
Created May 12, 2019 13:01 — forked from ewoks/Keeping_fork_up-to-date.md
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@slivik
slivik / check_if_key_exists.md
Created June 21, 2018 12:31
python - check if key exists in list of dicts
>>> lod = [{1: "a"}, {2: "b"}]
>>> any(1 in d for d in lod)
True
>>> any(3 in d for d in lod)
False