Skip to content

Instantly share code, notes, and snippets.

@kylekyle
kylekyle / iarrive.js
Created August 16, 2020 01:21
Uses MutationsObservers and IntersectingObservers to let you know when elements arrive or appear.
"use strict";
var arriveUniqueId = 0;
var utils = (function() {
var matches = HTMLElement.prototype.matches
|| HTMLElement.prototype.webkitMatchesSelector
|| HTMLElement.prototype.mozMatchesSelector
|| HTMLElement.prototype.msMatchesSelector;
return {
@kylekyle
kylekyle / ChangeForm.html
Last active September 6, 2020 20:59
Use Google Forms as an Electronic Medical Record system :-)
<style>
* {
font-family: Roboto;
}
li {
margin: 5px 0;
}
</style>
@kylekyle
kylekyle / mmi-csv.userscript.js
Created November 12, 2020 02:12
Tampermonkey script to add buttons for downloading MMI results as CSV
// ==UserScript==
// @name MMI CSV
// @namespace K-Dizzle
// @version 1.0
// @description Adds a button to download MMI results as a CSV
// @author K-Dizze
// @match https://mmi.run/*
// @grant none
// @require https://cdn.jsdelivr.net/gh/uzairfarooq/arrive/minified/arrive.min.js
// ==/UserScript==
@kylekyle
kylekyle / sshuttle-openwrt.md
Last active May 9, 2025 03:03
Install and configure sshuttle on OpenWrt

Install and configure sshuttle on OpenWrt

Note that ANY flash update will wreck the extroot configuration. I didn't realize that and had to:

Configure extroot

@kylekyle
kylekyle / disk.js
Last active January 15, 2021 05:36
Disk game proof-of-concept
// http://maxwellito.github.io/vivus/
// animate the appearance / disappearance?
// eight static
// two - opposite direction
// three in a circle
// randomly moving clickers
// shrinking / growing
import { SVG, easing, List, Runner, Timeline } from '@svgdotjs/svg.js'
import '@svgdotjs/svg.topath.js' // might need spinning disks
@kylekyle
kylekyle / Generic Object Detection.ipynb
Last active March 5, 2022 19:04
Minimal example of cropping and drawing bounding boxes around objects in images.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kylekyle
kylekyle / pool.py
Created March 22, 2022 01:30
A full example of a producer/consumer using process pools in python
from threading import Event
from time import sleep
from traceback import print_exception
from multiprocessing import Pool, Manager
from queue import Full
from signal import signal, SIGTERM, SIGINT
class Consumer1:
def __init__(self):
print("Initializing Consumer1 ...")