Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View earthbound19's full-sized avatar
🚀
creative coding, aiming for Art Blocks

Alex Hall earthbound19

🚀
creative coding, aiming for Art Blocks
View GitHub Profile
@earthbound19
earthbound19 / mediaWikiColorTableSort.sh
Last active January 30, 2016 04:54
Sorts mediaWiki color tables descending in HSL values, using Cygwin (~'nix) sed and sort.
# DESCRIPTION
# Sorts mediaWiki color tables by priority of columns H(ue), S(aturation), L(ightness), descending, using Cygwin (~'nix) sed and sort.
# USAGE
# Call this script with one parameter, being the text file to sort, *inline* -- meaning, THIS WILL DIRECTLY MODIFY whatever text file you pass to it.
## CODE
if [ -a $1_.bk ]
then
echo ~-~-~-~- Backup of input file $1 already exists. Will not execute. Check if the file you passed to this script is already in the state you wish. If not, delete the backup file and run this script against $1 again. ~-~-~-~-
else
@earthbound19
earthbound19 / RandomBunniesInterjection.ahk
Created March 4, 2015 02:50
Replaces the letter 'b' with the word "bunnies!" at a random chance (for everything you type on your computer--it is a global keyboard hook), which chance interval you may set by modifying this script and recompiling it. As is, 1 in 13 times you type b or B, it so afflicts or entertains you and/or your victim. Alternate hex source code provided …
This file has been truncated, but you can view the full file.
; I release this into the Public Domain. 03/03/2015 05:17:38 PM -RAH
; An AutoHotkey script which randomly replaces the letter 'b' with the word "bunnies!" at a random chance (for everything you type on your computer--it is a global keyboard hook), which chance interval you may set by modifying this script and recompiling it. As is, 1 in 13 times you type b or B, it so afflicts or entertains you and/or your victim.
; If you'd like to create this file without installing AutoHotkey, and you trust me, you can download and install HxD Hex Editor freeware from:
;http://mh-nexus.de/en/hxd/
; -- then create a new blank document with it, paste in the hexadecimal source code provided in the below hexcode dump comment, save it as an .exe, and see whether it destroys your soul and/or the computer. Otherwise, install AutoHotkey, save this source code as a .ahk file, right-click it, and "compile."
@earthbound19
earthbound19 / python: center-aligned columns of string images in a row.txt
Last active August 29, 2015 13:57
Render a horizontal series of multiples of a number, each centered along a grid width, with a font of your choice.
#See "TO CHANGE THE OUTPUT IMAGE, CHANGE THESE VARIABLES," below.
#Render a series of string multiples of a number, each horizontally centered along a tile-length grid; using a font of our choice.
#Started 2014-03-15 (Sat Mar 15) 04.53.40 PM RAH
#Horked and extended from:
#http://stackoverflow.com/questions/15857117/python-pil-text-to-image-and-fonts
import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
import math
@earthbound19
earthbound19 / sendRandomInterjections.ahk
Last active October 5, 2016 03:03
Send Random Interjections is an AutoHotkey script which randomly inserts (preferably funny or odd) user-selectable fallacious phrases (or words--for example, just as I typed that, it inserted the word "fallacious"), at a selectable "roll of the dice," as a user types. Turnip excellent for a prank. Pre-compiled Windows binary available at: https:…
; DESCRIPTION
;Inserts prank phrases as you type. Set the odds and insertion phrases. As 'twere by a cause wicked, when this autohotkey script (or an executable compiled therefrom) is loaded, while a user types, it randomly inserts prank words of your choosing, at a frequency (really a random chance or "dice roll") that you can also choose.
;USAGE
; Requires Autohotkey or for this script to be compiled to a binary executable by the same, and dangerously thus bovine. Also requires an I ha't to-morrow common fortunity an accompanying randomInterjections.txt text file in the path from which this is run; said file having silly words or phrases one per line. Then load this script (or executable) and type. Every time you type a space [ ], period [.], comma [,], open parenthesis [(], or dash [-], this program will "roll the dice" in the background. If it rolls a 1 (one), it will randomly interject a phrase or word into your typing (as loaded from randomInterjections.txt, which, again must be in the same directory a
@earthbound19
earthbound19 / sendRandomLaughter.ahk
Created October 3, 2013 04:29
AutoHotkey script, which provides a shortcut key combination to generate and send random "laughter" strings. You may decide, O user, whether the laughter is evil or not by context. HAHA HAHAHAHA HAHAHAHAhahahahaha HAHAHAHAHAHAHAHAHAhahahahahahahaHAHAHAHAHAHAHAHAHAHAHAHA!
;Hotkey (via AutoHotkey) to send random "laughter" strings via simulated keystrokes. Sample output: hahaha haha HAHAHA HAHAHAhahahahaha HAHAHAHAHAHAHAHAHAHAHAHA hahaha hahaha haha hahahahahahaha ha hahahahahahahahaHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAhahahahaha HAHAHAHAHAHAHAHAHAHAHAHAHAHAhahahahahahahahaha HAHAHAHAHAHAHAHAHAHAHAHAHAHAhahahahahahahahahahahaha haha hahaha ha haha HAHAHA HAHAHAha hahahaha haha hahaha HAHAHAHAHAHAHAHA HAHAHAHAHAHAHAHAha!
^+h:: ;CTRL+SHIFT+h
sendRandomLaughter()
return
;GENERAL NOTES: the comments in this repeatedly refer to "1 in x" "dice rolls." The "x" in that, or the highest number on the "die" is configurable in each of the "Random" function calls releated to each comment. For example:
;
; Random, val, 1, 6
;