Skip to content

Instantly share code, notes, and snippets.

View foone's full-sized avatar

Foone Turing foone

View GitHub Profile
@foone
foone / demisexual.flag
Last active February 8, 2024 02:38
pre-release VGAPride DSL files
$names=["demisexual"]
$description="The Demisexual pride flag"
// Unknown creator. Maybe research further?
$textcolor=$black
// The trick here is that we define the top&bottom colors twice, so this ends up looking like we have variable heights
$center_stripe = RGB(110, 0,112)
$bottom = RGB(210,210,210)
vertical{
import struct, os, sys,array, glob, itertools, argparse
from PIL import Image
A8SIGNATURE =0xA0A1A2A3
COMPRESS_NONE = 0
COMPRESS_RLE = 1
COMPRESSION_FORMATS=(COMPRESS_NONE, COMPRESS_RLE)
ESCAPE_CODE = 0
import struct,sys,os
name=sys.argv[1]
class AllBitsTester(object):
def __init__(self):
self.allbits =0
def test(self, x):
self.allbits|=x
def completed(self):
return self.allbits == 1023
def message(self):
@foone
foone / censorlist.json
Last active December 3, 2023 12:54
Censor list for the TV Guardian 1.05 version
{
"wordlist": {
"A": {
"trailers": [0],
"flags": ["NEGATIVE MATCH"],
"replacement_offset": 1,
"replacement_word": "TAIL"
},
"A CONDOM": {
"trailers": [0],
import os,glob,sys
images=glob.glob(sys.argv[1])
images.sort()
if (len(images)&1) == 1:
print("Odd number of items! Can't split")
sys.exit(1)
midpoint = len(images)//2
first_half = images[:midpoint]
last_half = images[midpoint:][::-1]
@foone
foone / listarc.py
Created June 26, 2022 18:42
Display indexes of archive files for Lucky's Casino Adventure
import struct,glob
def readFilename(f):
data=''
while '.' not in data:
data=data+f.read(1)
data=data+f.read(3)
return data
for path in glob.glob('GL00_*.*'):
print path
with open(path,'rb') as f:
@foone
foone / hots.py
Created January 5, 2022 04:28
Hall of Tortured Souls
#!/usr/bin/python
import pygame
from pygame.constants import *
import sys,re
lines=[]
dots=[]
offset=[0,0]
def build_re(start,args):
return re.compile('^({})'.format(start) + (r'(?:[\s,]+)([-.\d]+)'*args))
def anymatch(line,regexes):
@foone
foone / level.txt
Created December 1, 2021 04:09
hall of tortured souls level
e -50 100 14 1
e 0 16 3 7
e -1 17 2 11
e 3 11 4 4
e 15 25 3 9
e 18 23 7 7
e 18 25 14 14
e 18.2 25.2 14 14
e 18.6 25.2 14 14
e 1 14 0 7
@foone
foone / two-ili9341.dts
Last active October 12, 2021 09:11
device tree overlay for dual ili9341 displays. Should work now
/*
* Device Tree overlay for 2x ili9341 2.2"
*
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
@foone
foone / pintest.py
Created September 30, 2021 17:00
A tool for testing files for stuck bits, bits which never change or only change in pairs
import struct,sys,os
name=sys.argv[1]
class AllBitsTester(object):
def __init__(self):
self.allbits =0
def test(self, x):
self.allbits|=x
def completed(self):
return self.allbits == 1023
def message(self):