Skip to content

Instantly share code, notes, and snippets.

View Timendus's full-sized avatar

Tim Franssen Timendus

View GitHub Profile
@Timendus
Timendus / CHIP-8 Binary format.md
Last active July 7, 2022 21:20
An effort to standardise on a header format for CHIP-8 and friends
@Timendus
Timendus / thumby.py
Last active July 14, 2022 09:57
A "compile, send and run" script for working with Thumby programs that consist of multiple files. See https://github.com/Timendus/thumby-silicon8/tree/grayscale or https://github.com/mirandavdende/thumby-snake for examples of projects using this script.
#!/usr/bin/env python3
# This sends everything in ./Games/ to your Thumby, and launches the program. It
# only sends files modified since the last send to your Tumby to save time. If
# you want to, it can also compile some specific files to `.mpy`, and send those
# instead of the `.py` files.
# Tested on Mac, depends on Ampy being installed.
# See https://github.com/scientifichackers/ampy#installation for instructions
@Timendus
Timendus / GrayscaleTest.py
Created April 25, 2022 15:20
A naive attempt to show grayscale images on the Thumby
import thumby
from framebuf import FrameBuffer, MONO_VLSB
from time import ticks_ms, sleep_us, sleep_ms
# BITMAP: width: 72, height: 40
girl_layer1 = FrameBuffer(bytearray([
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,68,21,106,149,74,41,2,120,254,254,255,255,255,255,127,127,127,126,126,120,48,64,0,0,0,0,0,0,0,0,2,1,4,18,9,38,217,36,84,160,80,128,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,5,0,128,218,248,230,255,127,191,252,254,244,250,249,194,227,224,240,168,176,40,0,0,0,0,0,0,0,0,0,0,0,0,3,20,43,68,186,69,40,160,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,224,240,119,31,31,63,59,57,54,121,63,127,191,255,31,239,23,73,130,0,0,0,0,0,0,0,64,0,0,0,0,40,128,0,0,0,0,2,1,22,9,36,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,240,248,248,252,254,254,255,255,255,235,0,224,248,254,78,0,1,28,13,15,2,11,2,1,0,0,0,128,192,64,0,0,0,88,2,0,0,0,0,0,55,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@Timendus
Timendus / bibify.js
Created September 30, 2021 19:07
A quick snippet to convert numeric references in a text document to LateX `\cite` references, given a matching .bib file
const fs = require('fs');
const bibfile = "bibfile.bib";
const infile = "texfile.tex";
const outfile = "output.tex";
const bib = fs.readFileSync(bibfile, "utf8");
const tex = fs.readFileSync(infile, "utf8");
const bibs = bib.split('\n\n')
@Timendus
Timendus / zoom-subtitles.html
Last active June 17, 2021 08:44
A demonstration of using speech recognition and Google Translate to live-subtitle Zoom meetings
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Zoom subtitles</title>
<script type="text/javascript">
let recognizer, zoomUrl, translateKey;
let currentSeq = 0;
let currentLang = 'nl-NL';

Keybase proof

I hereby claim:

  • I am Timendus on github.
  • I am timendus (https://keybase.io/timendus) on keybase.
  • I have a public key whose fingerprint is DBEF 562D 1247 1634 A64B 34BF 159D B0AE C324 0D6C

To claim this, I am signing this object: