Skip to content

Instantly share code, notes, and snippets.

View ross-spencer's full-sized avatar
💭
🖖

Ross Spencer ross-spencer

💭
🖖
View GitHub Profile
@ross-spencer
ross-spencer / version examples (unique)
Created November 19, 2026 16:28
PRONOM version fields
<FormatVersion>0-2</FormatVersion>
<FormatVersion>0.2</FormatVersion>
<FormatVersion>0.9</FormatVersion>
<FormatVersion>09</FormatVersion>
<FormatVersion>0</FormatVersion>
<FormatVersion>0 Generic</FormatVersion>
<FormatVersion>0 MPEG Encoding</FormatVersion>
<FormatVersion>0 PCM Encoding</FormatVersion>
<FormatVersion>0 WAVEFORMATEXTENSIBLE Encoding</FormatVersion>
<FormatVersion>0x00010000</FormatVersion>
@ross-spencer
ross-spencer / sigtool.xml
Last active November 17, 2026 16:12
sigtool-container.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ContainerSignatureMapping schemaVersion="1.0" signatureVersion="40">
<ContainerSignatures>
<ContainerSignature ContainerType="OLE2" Id="1000">
<Description>Microsoft Word 6.0/95 OLE2</Description>
<Files>
<File>
<Path>WordDocument</Path>
</File>
<File>
@ross-spencer
ross-spencer / convert_pas.py
Created January 8, 2026 11:03
TheDRAW Converter - Pascal / Python (Basic)
"""Script to convert PAS to rudimentary ASCII art.
Via: https://jnz.dk/swag/ANSI/0040.PAS.html
^^ Not sure what the image is other than some text.
"""
data = """
{ TheDraw Pascal Screen Image. Date: 08/29/95 }
const
@ross-spencer
ross-spencer / add-wikidata-links-to-adb.user.js
Created August 20, 2025 07:57 — forked from wragge/add-wikidata-links-to-adb.user.js
Add links from Wikidata to entries in the Australian Dictionary of Biography
{
"basics": {
"name": "Thomas Edison",
"label": "Inventor and Businessman",
"picture": "https://example.com/photo.jpg",
"email": "thomas.edison@example.com",
"phone": "(123) 456-7890",
"website": "https://thomasedison.com",
"summary": "Prolific inventor and businessman known for developing many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the electric light bulb.",
"location": {
@ross-spencer
ross-spencer / robust.md
Created February 11, 2025 14:01
Example robust link
@ross-spencer
ross-spencer / asciihist.py
Created January 16, 2025 17:42 — forked from bgbg/asciihist.py
ASCII histograms
from __future__ import print_function
import numpy as np
def asciihist(it, bins=10, minmax=None, str_tag='',
scale_output=30, generate_only=False, print_function=print):
"""Create an ASCII histogram from an interable of numbers.
Author: Boris Gorelik boris@gorelik.net. based on http://econpy.googlecode.com/svn/trunk/pytrix/pytrix.py
License: MIT
"""
ret = []
@ross-spencer
ross-spencer / query.sparql
Created December 30, 2024 09:07
Non-alphanumerical (Latin English) File Format Extensions in Wikidata (Regex)
SELECT DISTINCT ?idExtension ?extension ?mediaType ?idExtensionLabel
WHERE
{
?idExtension wdt:P31 wd:Q235557 ;
wdt:P1195 ?extension .
FILTER (!regex(?extension, "[0-9a-zA-Z]", "i")) .
OPTIONAL { ?idExtension wdt:P1163 ?mediaType }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?extension ?mediaType
@ross-spencer
ross-spencer / sqlbuddy.py
Created December 30, 2024 07:41 — forked from angea/sqlbuddy.py
Scans SQLite files for known features (UserVersion, AppId, Schema...)
#!/usr/bin/env python3
# Scans SQLite files for known features (UserVersion, AppId, Schema...)
# Ange Albertini 2024
import argparse
import hashlib
import sqlite3
import sys
user_versions = {
@ross-spencer
ross-spencer / imagetest.sh
Created November 22, 2024 20:19 — forked from kumbasar/imagetest.sh
How To Create a NTFS Image File in Linux
#!/bin/bash
set -x
image="test.img"
label="test"
mntdir=`mktemp -d`
sudo dd status=progress if=/dev/zero of=$image bs=6M count=1000 && sync
echo 'type=7' | sudo sfdisk $image