Skip to content

Instantly share code, notes, and snippets.

View wong-justin's full-sized avatar

J Wong wong-justin

View GitHub Profile

Current usage:

createCanvas(100, 100, WEBGL)
shader = createShader(vert, frag)
filter(shader) // error, only expects THRESHOLD|GRAY|OPAQUE... 

Proposed usage:

@wong-justin
wong-justin / clockchars.flf
Created November 14, 2022 00:51
Simple unicode-block FIGlet font for clock times
flf2a$ 5 5 24 -1 8 0 0 0
A blocky font for displaying digital clock times. Created 2022-11-12. J.Wong
Characters: space,0-9,colon,Aa,Pp,Mm. Actual max length ~9, but chkfont
doesn't recognize multibyte unicode chars (█ is 4 bytes). Sample:
██████ ██ ██ ██████ ██████ ████████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██████ ██████ ██████ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██████ ██ ██ ██ ██
$$@
__________________
/ \
venn / \
diagrams / __________\_______
/ curvy / \ \
/ / \ \ ascii
\ / / \ tables
\ / this / \
\ / / \
@wong-justin
wong-justin / livereload.py
Last active May 10, 2022 19:34
A python live reloading server. Ping it regularly, looking for json response {"files_changed": true}
from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path
import os
from textwrap import indent
import click
### server and file watching logic
class FilesTracker: