Skip to content

Instantly share code, notes, and snippets.

@PM2Ring
PM2Ring / SquareTriTessBW.svg
Created January 24, 2021 21:15
Tessellate a square with 45-60-75 degree triangles, monochrome
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PM2Ring
PM2Ring / MathJaxTable.py
Created January 31, 2021 02:21
Simple MathJax table maker, using SageMathCell
class Table:
def __init__(self, align, data):
self.buff = []
self.make(align, data)
def get(self):
s = "\n".join(self.buff)
return s + "\n\\end{array}"
def put(self, s):
@PM2Ring
PM2Ring / merger_splitter1.svg
Created February 4, 2021 08:17
Merger-splitter diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PM2Ring
PM2Ring / Crate3D.html
Created June 18, 2021 11:51
Stereo pair (wide eye) demo using three.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
</head>
<body>
<canvas id="can3js" width="640" height="320"></canvas><br>
<button id="stopstart">Start</button><br>
</body>
@PM2Ring
PM2Ring / SunSSB.svg
Created July 18, 2021 13:56
Sun-SSB radial distance, 1945-1995
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PM2Ring
PM2Ring / SVGBezierToy.html
Created July 26, 2021 11:50
Basic Bezier curve, interactive
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SVG Bézier</title>
<style id="mystyle">
circle {
stroke: #222;
stroke-width: 0.5;
stroke-opacity: 0.25;
@PM2Ring
PM2Ring / ApollonianTriangle.svg
Last active May 24, 2025 19:54
Miscellaneous SVGs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PM2Ring
PM2Ring / leap-seconds.py
Last active June 25, 2024 13:51
Parsing the leap-seconds.list file
# Fetch & parse leap-seconds.list
from datetime import datetime, timezone, timedelta
from hashlib import sha1
import requests
# Leap second data source
# url = 'https://www.ietf.org/timezones/data/leap-seconds.list'
url = 'https://raw.githubusercontent.com/eggert/tz/main/leap-seconds.list'
@PM2Ring
PM2Ring / MultiplicationDrill.html
Last active January 18, 2022 17:19
Simple multiplication drill app, in JavaScript
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Multiplication Drill</title>
</head>
<body>
<h3>Multiplication Drill</h3>
<input id="aLo" type="number" value="2"><label for="aLo">Low A</label><br>