Skip to content

Instantly share code, notes, and snippets.

@jocelynthode
jocelynthode / arch-secure-install.md
Created January 1, 2022 15:11 — forked from umbernhard/arch-secure-install.md
Building a Secure Arch Linux Device

Building a Secure Arch Linux Device

Locking down a linux machine is getting easier by the day. Recent advancements in systemd-boot have enabled a host of features to help users ensure that their machines have not been tampered with. This guide provides a walkthrough of how to turn on many of these features during installation, as well as reasoning for why certain features help improve security.

The steps laid out below draw on a wide variety of existing resources, and in places I'll point to them rather than attempt to regurgitate full explanations of the various security components. The most significant one, which I highly encourage everyone to read, is Rod Smith's site about secure boot, which is the most comprehensive and cogent explanation of UEFI, boot managers and boot loaders, and secure boot. Another incredibly useful resources is Safeboot, which encapsulates many of the setup steps below in a Debian application.

@jocelynthode
jocelynthode / gfid-resolver.sh
Created June 3, 2019 09:32 — forked from louiszuckerman/gfid-resolver.sh
Glusterfs GFID Resolver Turns a GFID into a real path in the brick
#!/bin/bash
if [[ "$#" < "2" || "$#" > "3" ]]; then
cat <<END
Glusterfs GFID resolver -- turns a GFID into a real file path
Usage: $0 <brick-path> <gfid> [-q]
<brick-path> : the path to your glusterfs brick (required)
#!/usr/bin/env python3
import random
def choose_door():
return random.randint(1,3)
def execute(change):
initial_choice = choose_door()
@jocelynthode
jocelynthode / di.py
Last active January 28, 2025 05:21
DiForFree
#!/usr/bin/env python3
import argparse
import logging
import random
import signal
import subprocess
import sys
BASE_URL = 'http://pub1.diforfree.org:8000/di_{:s}_hi'
@jocelynthode
jocelynthode / 10.99.0.89.test
Created January 9, 2017 09:10
Logs from node 10.99.0.89
2017-01-09 08:59:33,136 - INFO: Create server listening on 10.99.0.89:15342
2017-01-09 08:59:33,137 - INFO: Server allow_reuse_address: True
2017-01-09 08:59:33,137 - INFO: Sleeping for 120s
2017-01-09 09:01:33,137 - INFO: Finished sleeping
2017-01-09 09:01:33,145 - INFO: View size: 20
2017-01-09 09:01:33,145 - INFO: Loop 0
2017-01-09 09:01:33,145 - INFO: Sending to 10.99.0.153
2017-01-09 09:01:33,146 - INFO: Sending to 10.99.0.93
2017-01-09 09:01:33,146 - INFO: Sending to 10.99.0.82
2017-01-09 09:01:33,146 - INFO: Sending to 10.99.0.143