Skip to content

Instantly share code, notes, and snippets.

View doctaphred's full-sized avatar
🚮
computers are bad don't use them

Frederick Wagner doctaphred

🚮
computers are bad don't use them
View GitHub Profile
@doctaphred
doctaphred / x509_fingerprint.py
Last active July 9, 2021 14:59
Read an X.509 cert from stdin and print its formatted SHA1 fingerprint to stdout
#!/usr/bin/env python3
import sys
from base64 import b64decode
from hashlib import sha1
cert = sys.stdin.read()
lines = cert.splitlines()
assert lines[0] == '-----BEGIN CERTIFICATE-----'
assert lines[-1] == '-----END CERTIFICATE-----'
data_lines = lines[1:-1]
@doctaphred
doctaphred / intensify.sh
Created July 27, 2021 18:42 — forked from alisdair/intensify.sh
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking