This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Author: Lokno Ketchup | |
; Description: Autohotkey script that fills a number sequence 0-n into | |
; a text editor vertically. The user is prompted for the range n. | |
; Default Shortcut: Ctrl+N | |
; return the digit count of x | |
CountDigits(x) | |
{ | |
total := 0 | |
Loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script that uses arduino-cli to discover a Arduino board attached | |
# to serial to compile and upload an Arduino sketch | |
#!/usr/bin/env python3 | |
from subprocess import check_output | |
import re | |
import sys | |
program_name = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Downloads a public Google Sheets spreadsheet and prints it to stdout in CSV format | |
# | |
# NOTE: Sometimes if the format of cells are set to "Automatic" and there are mixed types in a single | |
# column, some values might be misinterpreted as empty. If this happens, set the format of all | |
# cells in that column, or even the entire table, to "Plain Text" | |
# | |
# To make a spreasheet public: | |
# In Google Sheets, click the Share button and then select "change to anyone with the link" | |
from urllib.parse import quote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
if len(sys.argv) != 3: | |
print(f' usage: {sys.argv[0]:s} <declaration file> <name>') | |
sys.exit(0) | |
array_re = re.compile( "([A-Za-z_ ]+) +([a-zA-Z0-9_]+)\[([0-9]+)\];?\n" ) | |
value_re = re.compile( "([A-Za-z_ ]+) +([a-zA-Z0-9_]+);?\n" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <random> | |
#include <limits> | |
#ifdef __unix__ | |
#include <pthread.h> | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Single Header Library for Simple Cross-Platform Threading | |
// | |
// sthread_handle handle; | |
// STHREAD_CREATE(handle, Func, &argument ); | |
// STHREAD_JOIN(handle); | |
// STHREAD_DESTROY(handle); | |
// | |
// STHREAD_RETVAL Func( void* pArguments ) | |
// { | |
// // Do Work Here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^d:: | |
Send {+Home} | |
Send ^c | |
Send {End} | |
RegExMatch(clipboard, "(\d+)$", SubPat) | |
StringRight, lastDigit, SubPat, 1 | |
if( SubPat == "11" || SubPat == "12" || SubPat == "13" ) | |
{ | |
Send, th | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Commands for adding the Internalization Commands (copy whole line and paste into chat) | |
!addcom -cd=5 !perc $(eval t='nick';vs=`$(query)`;if(vs.split(' ').length>1){t=`$(1)`;vs=`$(2)`;a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=$(1)&user=$(user)&value=$(2))`;}else{a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=nick&user=$(user)&value=$(1))`;}v=Math.min(Math.max(parseInt(vs,10)|0,0),100);t=t[0].toUpperCase()+t.slice(1);`$(user) added `+v+`% to `+t+`'s Internalization`) | |
!commands add !perc_reset -ul=moderator -cd=5 $(eval t='nick';if(`$(query)`.length>0){t=`$(1)`;a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=$(1)&clear=all)`;}else{a=`$(urlfetch http://lokno.rabbitfury.com/avg/?key=MDAwMTAwMDMwSW50ZXJuYWxpemF0aW9uOiBQRVJDJQ==&name=nick&clear=all)`;}t=t[0].toUpperCase()+t.slice(1);t+`'s Internalization has been reset`) | |
!commands add !perc_get -ul= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys,os | |
import subprocess | |
types = { 'int' : '%d', | |
'long' : '%ld', | |
'long long' : '%lld', | |
'float' : '%.32f', | |
'double' : '%.56f', | |
'unsigned' : '%u', | |
'unsigned long' : '%lu', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.prototype.pad = function(size) { | |
var s = String(this); | |
while (s.length < (size || 2)) {s = "0" + s;} | |
return s; | |
} | |
if( document.URL.endsWith('/input') ) | |
{ | |
var url_sans_input = document.URL.slice(0,document.URL.lastIndexOf('/')) | |
var day_num = parseInt(url_sans_input.slice(url_sans_input.lastIndexOf('/')+1)) |