Skip to content

Instantly share code, notes, and snippets.

View gingerbeardman's full-sized avatar

Matt Sephton gingerbeardman

View GitHub Profile
@gingerbeardman
gingerbeardman / kye_rules.txt
Created August 30, 2023 15:05
The Rules of Kye, by Tim Babcock (from https://www.ticalc.org/archives/files/fileinfo/337/33784.html source code)
The Rules of Kye
All of them.
By Jim Babcock
//{{{
1.1 Purpose
There are at least five implementations of Kye, all of which differ subtly
in their rules. This is because the authors had nothing to go on but the
previous games themselves, from which it can be difficult to determine
@gingerbeardman
gingerbeardman / classify.py
Last active August 13, 2023 17:35
Use YAMNet model to classify sounds according to AudioSet categories
#!/usr/bin/env python
import sys
import subprocess
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
import csv
@gingerbeardman
gingerbeardman / bin2wav.sh
Last active August 12, 2023 19:17
Convert Director 'snd ' chunks to wav files (requires: sox, ProjectorRays)
#!/usr/bin/env bash
# our file
CHUNK=$1
DIR=$( dirname $CHUNK )
NAME=$( basename -s ".bin" $CHUNK )
PCM="$DIR/$NAME.raw"
WAV="$DIR/$NAME.wav"
# announce current file
anima_1.dcr
anima_2.dcr
anima_3.dcr
bambam.dcr
beach.dcr
bound.dcr
cave.dcr
chai1.dcr
chai2.dcr
chai_mu.dcr
born.dcr
alien.dcr
amazing.dcr
AmigosMenu.dcr
baby.dcr
bananan.dcr
box.dcr
bust.dcr
cemetry.dcr
christmas.dcr
local gfx <const> = playdate.graphics
local W <const> = playdate.display.getWidth()
local H <const> = playdate.display.getHeight()
local BAND_HEIGHT <const> = 6 --band size
function playdate.update()
for band=0,8 do --create gradient using multiple bands
gfx.setDitherPattern(1-1/(band+1), gfx.image.kDitherTypeBayer8x8) --dither amount
@gingerbeardman
gingerbeardman / feeds.opml
Created June 29, 2023 20:27
RSS feeds OPML
<?xml version="1.0" encoding="UTF-8"?>
<opml xmlns:frss="https://freshrss.org/opml" version="2.0">
<head>
<title>FreshRSS</title>
<dateCreated>Thu, 29 Jun 2023 21:15:11 +0100</dateCreated>
</head>
<body>
<outline text="Computers">
<outline text="32by32" type="rss" xmlUrl="https://32by32.com/feed/" htmlUrl="https://32by32.com/" description="Macintosh History from the 1980s"/>
<outline text="Accidentally in Code" type="rss" xmlUrl="https://cate.blog/feed/" htmlUrl="https://cate.blog" description="Engineering an Interesting Life"/>
@gingerbeardman
gingerbeardman / Linkding.postman_collection.json
Created May 20, 2023 11:50
Linkding collection for Postman
{
"info": {
"_postman_id": "356eda77-071b-42db-97f1-53f297f4cf4d",
"name": "Linkding",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "26329767"
},
"item": [
{
"name": "AUTH",
@gingerbeardman
gingerbeardman / uri.sh
Created May 1, 2023 16:29
Convert a file to data-uri
#!/usr/bin/env bash
echo "url('data:$(file -bN --mime-type "$1");base64,$(base64 < "$1")')"
@gingerbeardman
gingerbeardman / polyglot.css
Last active March 28, 2023 19:03
Quick fix for WebKit change that breaks Polyglot Safari Extension popup, put in your user stylesheet
div#polyglot__panel {
transform: scale(1) !important;
}