Skip to content

Instantly share code, notes, and snippets.

View julian-klode's full-sized avatar

Julian Andres Klode julian-klode

View GitHub Profile
#!/usr/bin/python3
import json
import os
import socket
import sys
socketFd=int(os.environ["APT_HOOK_SOCKET"])
@julian-klode
julian-klode / README.md
Last active June 8, 2019 18:58
Setting up a server-side encrypted maildir

This describes the idea behind an encrypted maildir on the server, with multiple clients that have access to it, and store unencrypted copies.

Initial setup:

  1. Generate a gpg key like [email protected]
  2. Import the public key into the keyring on the server
  3. Import private and public keys into keyring on the clients

On the server:

  1. Create an empty Maildir
#!/usr/bin/env python3
"""Encrypt/Decrypt GPG/MIME messages"""
import os
import sys
import email.mime.application
import email.mime.multipart
import email.mime.message
import errno
config:
user.user-data: |
#cloud-config
apt:
proxy: http://_gateway:8000
apt_pipelining: unchanged
description: Default LXD profile
devices:
eth0:
name: eth0
///bin/true; exec /usr/bin/env go run "$0" "$@"
package main
import (
"flag"
"log"
"os"
"regexp"
"runtime/pprof"
"strings"
#!/usr/bin/python3
import json
import requests
import os
import sys
import time
from collections import OrderedDict
from typing import Any, Dict, Iterator
#!/bin/sh
write() {
file="$1"
shift
echo "$@" | sudo tee "$file"
}
case "$1" in

APT 2.0

After brewing in experimental for a while, and getting a first outing in the Ubuntu 19.10 release; both as 1.9, APT 2.0 is now releasing to unstable.

Compared to the 1.8 series, the APT 2.0 series features several new features, as well as improvements in performance, hardening. A lot of code has been removed as well, reducing the size of the library.

Changes Since 1.8

apt (1.9.11) experimental; urgency=medium
[ Tomáš Janoušek ]
* bash completion: Add autopurge command
[ Tris Emmy Wilson ]
* apt-mark: don't lie about successful marks
[ Julian Andres Klode ]
* apt(8): Wait for lock (Closes: #754103)
#!/bin/bash
[ -e $XDG_RUNTIME_DIR/OVMF_VARS.fd ] || cp /usr/share/OVMF/OVMF_VARS.ms.fd $XDG_RUNTIME_DIR/OVMF_VARS.fd
kvm -smp 2 \
-m 4096 \
-cpu host \
-M q35 \
-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \