View donordrive-display.html
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> | |
<style> | |
/* local css here */ |
View srl.html
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>SRL Races</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"> | |
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script> |
View srlmulti.py
This file contains 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
from bottle import * | |
from urllib.request import urlopen | |
import json | |
import re | |
DEFAULT_HOSTS = ['multitwitch.tv', 'multistre.am', 'kadgar.net/live'] | |
SRL_API = "https://api.speedrunslive.com/races/" | |
SANITY_RE = re.compile('[0-9a-z]+') | |
RACE_STATE_COMPLETE = 4 # from the SRL API |
View jollymania.py
This file contains 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 os.path | |
import sqlite3 | |
import urllib.request | |
def main(): | |
db = sqlite3.connect(os.path.join('Data', 'flashpoint.sqlite')) | |
cur = db.execute("SELECT launchCommand FROM game WHERE launchCommand LIKE '%games2jolly%'") | |
urls = [s for (s,) in cur.fetchall()] | |
for index, url in enumerate(urls): | |
print('{}/{} {}'.format(index + 1, len(urls), url)) |
View codepage_unzip.py
This file contains 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
# A little script to extract old japanese zip files | |
# with the correct text encoding for filenames. | |
# Most applications assume a US text codepage for | |
# old zip formats, which is not always correct. | |
import os | |
import shutil | |
import sys | |
import zipfile | |
from datetime import datetime |
View outlook-disable-encryption.py
This file contains 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 ctypes, ctypes.wintypes | |
advapi32 = ctypes.windll.advapi32 | |
# LSTATUS RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) | |
RegOpenKeyExA = advapi32.RegOpenKeyExA | |
RegOpenKeyExA.argtypes = (ctypes.wintypes.HKEY, ctypes.wintypes.LPCSTR, ctypes.wintypes.DWORD, ctypes.wintypes.DWORD, ctypes.wintypes.PHKEY) | |
# LSTATUS RegCloseKey(HKEY hKey) | |
RegCloseKey = advapi32.RegCloseKey |
View constexpr-char-lookup-table.cpp
This file contains 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
// generate character-based static lookup tables | |
// that can be used for character classification, | |
// e.g. like in cctype functions (isdigit, isalpha ...) | |
struct CharLookupTable | |
{ | |
bool data[256]; | |
template <unsigned int N> | |
constexpr CharLookupTable(const char (&str)[N]) |
View pihut_xmas_tree.py
This file contains 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
from gpiozero import LEDBoard | |
from time import sleep | |
import random | |
tree = LEDBoard(*range(2, 28), pwm=True) | |
# first led is the top one in the star | |
tree[0].value = 0.6 | |
leds = range(1, len(tree)) |
View colormsvc.py
This file contains 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, re | |
COMPILE_PATTERN = re.compile(r'^.+\(\d+\) ?: (fatal )?(error|warning|note)( C\d+)?: .+$') | |
LINK_PATTERN = re.compile(r'^.+ : (fatal )?(error|warning) LNK\d+: .+$') | |
OTHER_PATTERN = re.compile(r'^.+ : (general |Command line )?(error|warning) \w+ ?: .+$') | |
class WinColorStream: | |
# wincon.h | |
FOREGROUND_BLACK = 0x0000 | |
FOREGROUND_BLUE = 0x0001 |
View twitch_redirect.py
This file contains 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
# uses bottle.py as web framework, streamlink for getting the stream URL | |
# and hls.js to play the HLS stream in an HTML5 video tag | |
from bottle import * | |
from streamlink import Streamlink | |
from urllib.request import urlopen, Request | |
import sys, re, json | |
def u(s): | |
if isinstance(s, str): |
NewerOlder