Skip to content

Instantly share code, notes, and snippets.

NeuralJohnson is now ran on an Amazon EC2 micro instance, it connects to Twitch chat servers, reads in chat messages, and after a configured number of messages that pass by, it uses a Markov Chain to attempt to construct a unique sentence (>=70% uniqueness to an individual message).

NJ now will listen to commands sent via DM, the commands are the same, but add the channel name to the end.

-wipe metalus69

-number 50 metalus69

Admin / Mod Commands:

-ping

@triffid
triffid / openrc-init-pia
Last active February 15, 2024 06:48
shell script for accessing PIA wireguard
#!/sbin/openrc-run
command="/root/bin/pia-wg.sh"
CONFIGDIR="${CONFIGDIR:-/var/cache/pia-wg}"
CONFIG="${CONFIG:-/etc/pia-wg/pia-wg.conf}"
extra_started_commands="reload"
depend() {
@gpjt
gpjt / letsencrypt.py
Last active February 29, 2024 03:50
Sample acme code to get a certificate from Let's Encrypt
# There's a lack of sample code for acme/Let's Encrypt out there, and
# this is an attempt to at least slightly remedy that. It's the result
# of my first day's hacking on this stuff, so almost certainly contains
# errors and oversights.
#
# It's not designed to be specifically useful if what you want is
# just a cert -- certbot or dehydrated are better for that. It is sample
# code for people who are building automated systems to deal with large
# numbers of Let's Encrypt certificates to play with.
#
VK_LBUTTON = 0x01 #Left mouse button
VK_RBUTTON = 0x02 #Right mouse button
VK_CANCEL = 0x03 #Control-break processing
VK_MBUTTON = 0x04 #Middle mouse button (three-button mouse)
VK_XBUTTON1 = 0x05 #X1 mouse button
VK_XBUTTON2 = 0x06 #X2 mouse button
VK_BACK = 0x08 #BACKSPACE key
VK_TAB = 0x09 #TAB key
VK_CLEAR = 0x0C #CLEAR key
VK_RETURN = 0x0D #ENTER key