Skip to content

Instantly share code, notes, and snippets.

View hangman.hs
module Hangman (play) where
import Data.Char (toUpper)
import System.Random (newStdGen, randomR)
data Hangman = Hangman { errors :: Int, tried :: [Char], letters :: [Letter] }
data Letter = Letter { guessed :: Bool, char :: Char }
play :: IO ()
@tam-carre
tam-carre / README.md
Created Nov 27, 2020 — forked from Delnegend/README.md
Embed VTT subtitles into HTML
View README.md

Objective

I have a video file on my local disk. I also have some subtitles (in HTML5's [WebVTT][] format).

I want to create an HTML file to play that video with subtitles, all from the local filesystem.

Problem

Loading an external VTT file from the local filesystem [fails due to same-origin policy][q].

@tam-carre
tam-carre / underwater_signs.c
Created Jun 14, 2020
Underwater traffic signs OLED animation
View underwater_signs.c
#ifdef OLED_DRIVER_ENABLE
#define ANIM_NUM_FRAMES 7 // number of frames in the animation
#define ANIM_FRAME_DURATION 150 // how long each frame lasts
#define ANIM_REVERSE // define this if you want the animation to run backwards at the end
#ifdef ANIM_REVERSE
#define ANIM_TOTAL_FRAMES (2*((ANIM_NUM_FRAMES)-1))
#else