Skip to content

Instantly share code, notes, and snippets.

@bitplane
bitplane / idea.md
Last active September 17, 2022 23:22
Stable diffusion keyword inspection

If we could take a low res sample of the network's hidden layers, with the right sampling algorithm it might be possible to compare them and see how they relate to each other.

If so, it might tell us all kinds of useful info about the labels used in the training data, let us visualise them, group, graph, find interesting intersections, areas of the network that

@bitplane
bitplane / tamperMonkeyGoogleDocsUncrop.js
Last active February 20, 2023 16:53
UserScript for Google Docs uncrop
//
// Uncrops Google Docs images by removing the clip path.
// Doesn't work in Webkit due to canvas elements not being
// in the dom. So Firefox only for now.
//
// Click the "raw" button and import the URL into your userscript
// manager - tested in tampermonkey but should work in whatever.
//
// ==UserScript==
@bitplane
bitplane / lego_scraper.py
Last active March 22, 2023 22:08
lego.com lego scraper
#!/usr/bin/python
import json
import logging
import os
import re
import urllib
import urllib2
from subprocess import call
@bitplane
bitplane / gecko-source.sh
Last active November 11, 2024 04:24
Gecko commits 2007-2024
git clone git@github.com:mozilla/gecko-dev.git
cd gecko-dev
for year in $(seq 2007 2024); do
echo $year
git log --since="$year-01-01" --until="$year-12-31" --pretty=format:"%ae" | tr '[:upper:]' '[:lower:]' > $year.txt
done
blacklist="grep -Ev wptsync@mozilla.com|b2gbumper@mozilla.com|automation\-bot"
#!/bin/bash
#
# Paste into bash like: xclip -selection clipboard -o | bash
#
set -euo pipefail
# Ensure dependencies are present
for cmd in curl xz qemu-system-aarch64 mktemp; do
if ! command -v "$cmd" >/dev/null 2>&1; then
#!/usr/bin/env python3
"""
Download latest snapshots of all pages from Wayback Machine.
"""
import sys
import argparse
import requests
import time
import os
import json
@bitplane
bitplane / RAR_5_SPEC.md
Created April 11, 2026 00:35
RAR 5 Clean Room Spec

RAR 5.0 Archive Format Specification

Independent documentation derived from publicly available sources:

No UnRAR source code was referenced in the creation of this document.