Skip to content

Instantly share code, notes, and snippets.

View fphammerle's full-sized avatar

Fabian Peter Hammerle fphammerle

View GitHub Profile
@fphammerle
fphammerle / debian-debootstrap-grub-uefi.sh
Created August 27, 2021 12:21 — forked from superboum/LICENCE.txt
Install Debian with Debootstrap + Grub EFI
#!/bin/bash
set -e # Exit on error
DEVICE=$1
[ -z "${DEVICE}" ] && echo "Usage $0 /dev/sdX" && exit 1
udevadm info -n ${DEVICE} -q property
echo "Selected device is ${DEVICE}"
read -p "[Press enter to continue or CTRL+C to stop]"
@fphammerle
fphammerle / python_http_client_connection_unix_socket.py
Created December 30, 2021 11:28
Send HTTP request to unix socket with python's built-in http.client.HttpConnection class
# tested on cpython v3.9.5
import http.client
import json
import pathlib
import socket
class _HttpConnectionUnixSocket(http.client.HTTPConnection):
def __init__(self, path: pathlib.Path) -> None: