Skip to content

Instantly share code, notes, and snippets.

@vyznev
vyznev / make_lls_grid.py
Last active August 9, 2019 08:39
Generate Logic Life Search (LLS) input grid for finding spaceships and oscillators, with additional features not yet supported natively by LSS (like strobing background and gradually moving search area).
#!/usr/bin/python
import re
import sys
import argparse
def fail(msg):
sys.stderr.write(sys.argv[0] + ": " + msg + "\n")
sys.exit(1)
@vyznev
vyznev / hex2map.py
Last active July 28, 2020 12:01
Convert non-totalistic hexagonal CA rules to MAP rules
#!/usr/bin/python
"""
This script converts hexagonal isotropic (possibly non-totalistic) CA rules[1]
into the equivalent MAP rules[2]. It runs under both Python 2 and Python 3, and
can be used either as a stand-along script (with the rules given as command line
arguments) or as a Golly plug-in.
[1]: http://www.conwaylife.com/wiki/Isotropic_non-totalistic_Life-like_cellular_automaton#Hexagonal_neighbourhood
[2]: http://golly.sourceforge.net/Help/Algorithms/QuickLife.html
"""
@vyznev
vyznev / incremental-markdown-preview.user.js
Last active July 10, 2018 10:10
Incremental Markdown preview for Stack Exchange
// ==UserScript==
// @name Incremental Markdown Preview for Stack Exchange
// @namespace https://github.com/vyznev/
// @description Speeds up the live Markdown preview on Stack Exchange sites by only updating changed DOM nodes
// @author Ilmari Karonen
// @version 0.1.0
// @copyright 2017-2018, Ilmari Karonen
// @license ISC; https://opensource.org/licenses/ISC
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
@vyznev
vyznev / se_timeline_link.user.js
Last active May 23, 2018 07:40
Stack Exchange timeline link user script
@vyznev
vyznev / se_hotness_estimator.user.js
Last active November 3, 2022 00:32
Adds an estimate of "hotness" to the question sidebar, calculated using the formula from http://meta.stackexchange.com/a/61343. Questions with a high hotness value may be selected for the Hot Network Questions list. Note that the hotness value displayed by this script does not include the per-site scaling factors, and so does not match the "arbi…
// ==UserScript==
// @name Stack Exchange hotness estimator
// @namespace http://vyznev.net/
// @description Estimates how highly each Stack Exchange question would rank on the Hot Network Questions list
// @author Ilmari Karonen
// @version 0.4.3
// @license Public domain
// @homepageURL https://meta.stackexchange.com/a/284933
// @downloadURL https://gist.github.com/vyznev/bb2c1adb6e96eb65a87bab3822c74e81/raw/se_hotness_estimator.user.js
// @match *://*.stackexchange.com/questions/*
@vyznev
vyznev / disable_display_math_in_comments.user.js
Last active August 26, 2021 17:12
User script to disable MathJax display math in comments on Stack Exchange sites
// ==UserScript==
// @name Disable display math in comments
// @namespace https://github.com/vyznev/
// @description Forces all MathJax elements in comments to be rendered inline
// @author Ilmari Karonen
// @version 1.1
// @match *://*.stackexchange.com/*
// @match *://*.mathoverflow.net/*
// @homepageURL http://meta.math.stackexchange.com/questions/23250/disable-display-math-in-comments
// @grant none
@vyznev
vyznev / se_beta_everywhere.user.js
Last active May 25, 2016 18:04
This user script makes all Stack Exchange Q&A sites use the generic beta site theme
// ==UserScript==
// @name Stack Exchange beta theme everywhere
// @namespace http://vyznev.net/
// @description Makes all Stack Exchange sites use the generic beta site theme
// @author Ilmari Karonen
// @version 0.5.2
// @license Public domain
// @homepageURL http://meta.stackexchange.com/a/275804
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
@vyznev
vyznev / se_delete_vote_saver.user.js
Last active March 10, 2016 14:41
This script tweaks the Stack Exchange Low Quality Posts review queue interface so as not to consume delete votes from reviewers who can cast them (i.e. those who have 20k+ rep, on graduated sites). See http://meta.stackoverflow.com/questions/316010/stop-using-delete-votes-in-the-lqprq for a related feature request and rationale.
// ==UserScript==
// @name Stack Exchange LQP delete vote saver
// @namespace https://github.com/vyznev/
// @description Tweaks the Stack Exchange Low Quality Posts review queue not to consume delete votes from 20k+ users
// @author Ilmari Karonen
// @version 0.2
// @license Public Domain (CC-Zero)
// @homepageURL http://meta.stackoverflow.com/a/316092
// @match *://*.stackexchange.com/review/low-quality-posts*
// @match *://*.stackoverflow.com/review/low-quality-posts*
// ==UserScript==
// @name ImageShack one-click recovery
// @version 0.2
// @namespace http://vyznev.net
// @description Highlights ImageShack images on Stack Exchange, and adds a click hadler that attempts to reload them from archive.org
// @author Ilmari Karonen
// @license ISC (http://opensource.org/licenses/ISC)
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// ==UserScript==
// @name SE Extra, Optional Features
// @namespace http://stackexchange.com/users/4337810/%E1%B9%A7%D0%BD%CA%8A%C3%9F
// @version 0.6.1
// @description Adds a bunch of optional 'features' to the StackExchange sites.
// @author ṧнʊß (http://stackexchange.com/users/4337810/%E1%B9%A7%D0%BD%CA%8A%C3%9F)
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*