Skip to content

Instantly share code, notes, and snippets.

@ysegorov
ysegorov / 00-voidlinux-fde-detached-header-remote-unlock.md
Last active February 5, 2024 10:13
Void Linux Full Disk Encryption with detached header, remote unlock and /boot on USB stick

Void Linux Full Disk Encryption with detached header, remote unlock and /boot on USB stick

This is a short description of steps to have new secure Void Linux installation with following features:

  • /boot partition on USB stick (not encrypted)
  • full disk encryption with detached LUKS header on USB stick
  • LVM on top of the encrypted partition
  • remote unlocking of the encrypted partition
  • mkinitcpio to generate initramfs
@ysegorov
ysegorov / PKGBUILD
Last active March 18, 2020 05:51
ArchLinux PKGBUILD for Alcor Micro AU6601 card reader (for Linux kernel 4.16+ only)
# Maintainer: Yuri Egorov <ysegorov@gmail.com> -> https://github.com/ysegorov
_pkgname=au6601
pkgname=${_pkgname}-dkms
pkgver=0.3
pkgrel=1
pkgdesc="PCI driver for Alcor Micro AU6601 Secure Digital Host Controller Interface (uses DKMS to automatically build the au6601-pci kernel module)."
# arch=('i686' 'x86_64')
arch=('x86_64')
url="https://launchpad.net/~iacobs/+archive/ubuntu/au6601/+packages"
@ysegorov
ysegorov / app.py
Last active March 30, 2017 12:42
Logger server using edge-triggered epoll
# -*- coding: utf-8 -*-
import os
import errno
import itertools
import socket
import select
import logging
import logging.config
import pickle
@ysegorov
ysegorov / Jenkinsfile
Last active April 8, 2021 14:31
Jenkinsfile example
#!/usr/bin/env groovy
// https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test.groovy
// http://stackoverflow.com/a/40294220
// https://JENKINS_HOST/scriptApproval/ - for script approval
import java.util.Date
def isMaster = env.BRANCH_NAME == 'master'
def isDevelop = env.BRANCH_NAME == 'develop'
@ysegorov
ysegorov / debug.py
Created January 18, 2016 04:04
Django debug helpers
# -*- coding: utf-8 -*-
import functools
import logging
import time
from django.conf import settings
from django.db import connection
@ysegorov
ysegorov / sub.py
Last active March 19, 2019 14:02 — forked from JobsDong/sub.py
tornado's Subprocess class usage example
#!/usr/bin/python2.7
#-*- coding=utf-8 -*-
import shlex
import subprocess
from tornado.gen import coroutine, Task, Return
from tornado.process import Subprocess
from tornado.ioloop import IOLoop
#!/usr/bin/env python
__author__ = 'Frank Smit <frank@61924.nl>'
__version__ = '0.1.0'
import functools
import psycopg2
from tornado.ioloop import IOLoop, PeriodicCallback