Skip to content

Instantly share code, notes, and snippets.

View starcraft66's full-sized avatar
🙀
listening to idm

Tristan starcraft66

🙀
listening to idm
View GitHub Profile
@starcraft66
starcraft66 / unhexdumpbatch.py
Last active July 2, 2020 20:56
Extract files from the Firefox for Android cache using html dumps of "Cache entry information" pages on devices where extracting the Firefox cache is not possible (non-rooted Android devices). Currently hardcoded to write files with the webp extension.
import re
import glob
from bs4 import BeautifulSoup
inputs = glob.glob("input/*.html")
for input in inputs:
ba = bytearray()
with open(input, 'r') as file:
@starcraft66
starcraft66 / matrix-postmortem.md
Last active November 9, 2024 06:31
nerdsin.space Matrix Server Incident Post-Mortem

17-05-2018 - LOSS OF DATA AND DOWNTIME OF THE NERDSIN.SPACE MATRIX HOME SERVER

Description

On May 17th 2018, the PostgreSQL instance housing all of the data pertaining to the nerdsin.space Matrix home server suffered a critical failure causing the complete loss of all user data.

Timeline

On May 17th 2018, around 11:45 EST, I (Tristan) started performing routine maintenance on the home server, the plan was to possibly update the Synapse instance to the latest revision and also to install the matrix-appservice-webhooks integration.

@starcraft66
starcraft66 / ddns.sh
Created October 6, 2017 02:17
Dynamic DNS updates to cloudflare, depends on gnu coreutils
#!/bin/bash
# CHANGE THESE
auth_email=""
auth_key="" # found in cloudflare account settings
zone_name="tdude.co"
record_name="417.tdude.co"
# MAYBE CHANGE THESE
ip=$(curl -s https://ipv4.icanhazip.com)
@starcraft66
starcraft66 / le-hpilo.sh
Last active October 20, 2024 12:36
Automatically deploy TLS certificates to HP iLO4 management controllers using the dehydrated ACME client.
#!/bin/bash
fqdn=ilo.example.com
username=Administrator
password=Password
#Check if the certificate is expiring soon
echo | openssl s_client -servername $fqdn -connect $fqdn:443 2>/dev/null | openssl x509 -noout -checkend 2592000
if [ "$?" == "1" ]; then
#Expiring in less than one month. We need to renew