Skip to content

Instantly share code, notes, and snippets.

@crawford
crawford / fb-photo.sh
Created July 18, 2020 03:04
Script for combining photos and metadata from Facebook data dumps
#!/usr/bin/env bash
set -euo pipefail
export LANG=C
ensure_valid() {
if [[ -z "${!1}" ]]
then
echo "Variable ${1} is empty"
exit 1
@crawford
crawford / rhcos.ipxe
Last active February 10, 2021 21:48
iPXE script for RHCOS on Packet.net
#!ipxe
set base-url http://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/latest/latest
kernel ${base-url}/rhcos-4.4.3-x86_64-installer-kernel-x86_64 initrd=${base-url}/rhcos-4.4.3-x86_64-installer-initramfs.x86_64.img console=ttyS1,115200 ip=dhcp rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=sda coreos.inst.image_url=${base-url}/rhcos-4.4.3-x86_64-metal.x86_64.raw.gz coreos.inst.ignition_url=https://gist.githubusercontent.com/crawford/0d98ab75b0aa5ca4b1fb54bbe2a225b3/raw/d26af1cf30893c2f05bd8dc69f72503b5f4406e7/ssh.json
initrd ${base-url}/rhcos-4.4.3-x86_64-installer-initramfs.x86_64.img
boot
{
"ignition": { "version": "2.2.0" },
"passwd": {
"users": [{
"name": "core",
"sshAuthorizedKeys": [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGS5PkYSgoYE0SNCIch4BppWuE8piUZ3saFTlgj5NXxe alex@albert" ]
}]
}
}

Keybase proof

I hereby claim:

  • I am crawford on github.
  • I am crawford (https://keybase.io/crawford) on keybase.
  • I have a public key whose fingerprint is 665D 0E34 E49D EB62 018A C127 CAEC 18B2 5233 471B

To claim this, I am signing this object: