Skip to content

Instantly share code, notes, and snippets.

View ducaale's full-sized avatar

Mohamed Daahir ducaale

  • eduMe
  • Helsinki, Finland
View GitHub Profile
@ducaale
ducaale / App.fsx
Last active June 7, 2021 19:14
(WIP) Can we implement react-hooks using FSharps's computation expressions?
// a good reference on how react-hooks work https://youtu.be/KJP1E-Y-xyo
// Also see brisk reconciler https://github.com/briskml/brisk-reconciler
let useTimer() = hook {
let! (now, setNow) = useState(0)
do! useEffect1 (fun () ->
let interval = setInterval 1_000 (fun () -> n+1 |> setNow)
fun () -> interval.clear()
) []
@ducaale
ducaale / resumake-logo.js
Created October 14, 2022 10:37
Generate Resumake logo using vercel/satori
import fs from 'fs/promises'
import satori from 'satori'
let html = {
type: 'div',
props: {
style: {
height: '100%',
width: '100%',
display: 'flex',