Skip to content

Instantly share code, notes, and snippets.

@jmatsushita
jmatsushita / README
Last active September 27, 2026 21:28
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@codemodify
codemodify / Thinkpad-X1-CarbonGen7.md
Created November 25, 2019 23:35
Arch Linux on Thinkpad X1 Carbon Gen 7 (i7-10710U)

Arch Linux on Thinkpad X1 Carbon Gen 7 (i7-10710U)

  • Download the latest ISO from https://www.archlinux.org/download
  • sudo dd if=archlinux-2019.11.01-x86_64.iso of=/dev/sda bs=4M status=progress oflag=sync
  • Boot the ISO
  • IF and ONLY IF you have a 4k or some HiDPI screen and fonts are super super small
    • ls /usr/share/kbd/consolefonts
    • setfont latarcyrheb-sun32
  • ls /sys/firmware/efi/efivars verifies we booted in UEFI
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active October 21, 2026 19:19
Arch Linux Full-Disk Encryption Installation Guide [LUKS2, LVM, Unified Kernel Image, Secure Boot, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS, booting a signed unified kernel image with systemd-boot on UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and a self-signed boot loader and kernel image.

Tested in October 2026 on an HP ZBook Ultra G1a and in a QEMU/OVMF virtual machine: systemd 262, mkinitcpio 42.2, cryptsetup 2.8.8, linux 7.2.9, sbctl 0.18.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

@rcoup
rcoup / aws_usage.py
Created June 1, 2010 21:46
A script to query the Amazon Web Services (S3/EC2/etc) usage reports programmatically.
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'