Skip to content

Instantly share code, notes, and snippets.

@WilliamsJack
WilliamsJack / premium.js
Last active February 8, 2025 05:59
Premium popup extension for LiveAtlas
(function() {
let styleEl = document.createElement('style');
styleEl.textContent = `
/*
Fade-in from opacity 0 to 1 over half a second.
We toggle .show to trigger the opacity transition.
*/
#premium-popup {
opacity: 0;
transition: opacity 0.5s ease-in-out;
@WilliamsJack
WilliamsJack / spider.sh
Created August 24, 2022 12:30
Create a list of URLs in a format that can be submitted to the Internet Archive
#!/bin/bash
# Creates a list of URLs in a format that can be submitted to the Internet Archive
# HOME - The page to start at
HOME="https://www.sfxrescue.com/"
# DOMAINS - Do not archive outside of these domains
DOMAINS="sfxrescue.com"
# DEPTH - Depth of search. The Internet Archive can optionally process backlinks going one level deeper, so for a normal site you won't need to increase this.
DEPTH=4
# OUTPUT - Output file
OUTPUT="./urls.csv"
@WilliamsJack
WilliamsJack / thermal_demo.py
Created February 4, 2020 06:35
Generate a list of thermal camera pixels from an image used by the SIGHTS software. Useful to create demo images.
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 30 16:55:05 2019
@author: willi
"""
from PIL import Image
import colorsys
width = 32
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>JS Insert Test</title>
</head>
<body>
<button id="insert" onclick="insertFunction();">Insert JS</button>