Skip to content

Instantly share code, notes, and snippets.

@BrockA
BrockA / waitForKeyElements.js
Created May 7, 2012 04:21
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
@mplewis
mplewis / watchdiff.py
Last active April 30, 2022 22:32
Watch a single file and output a diff when it changes.
#!/usr/bin/env python3
from diff_match_patch import diff_match_patch
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import sys
import time
from os.path import abspath, dirname
@samhenrigold
samhenrigold / medium-to-scribe.js
Last active September 15, 2023 19:29
UserScript to redirect medium.com articles to scribe.rip
// ==UserScript==
// @name Medium to Scribe
// @description Redirects Medium.com articles to scribe.rip
// @match *://*/*
// @exclude /^https?://(www\.)?medium\.com/((\?.*)|((m|about|creators|membership)/.*))$/
// @run-at document-end
// @version 1.2.4
// @updateURL https://gist.githubusercontent.com/samhenrigold/4a082dde823bc3cb62e43a2fc2b12b8e/raw/medium-to-scribe.js
// ==/UserScript==
@rogangriffin
rogangriffin / ebsynthfile.py
Last active March 12, 2024 21:25
Programmatically generate an EBS file for EBSynth
class EBSynthKeyFrame:
useFirstFrame = False
useLastFrame = False
firstFrame = 0
keyFrame = 0
lastFrame = 0
outputPath = ""
def __init__(self, inuseFirstFrame=False, inuseLastFrame=False, infirstFrame=0, inkeyFrame=0, inlastFrame=0, inoutputPath=""):
self.useFirstFrame = inuseFirstFrame