Skip to content

Instantly share code, notes, and snippets.

View borkdude's full-sized avatar

Michiel Borkent borkdude

View GitHub Profile
@borkdude
borkdude / thank-you-2025.md
Last active November 26, 2025 11:19
Thank you to sponsors!

Dear sponsors,

As we approach Thanksgiving once again, I’m reminded that sustained open source software development, supported by long term sponsors, is not something to take for granted.

I’m genuinely grateful for your ongoing support through GitHub Sponsors. Your contributions make a real difference: my Clojure projects wouldn’t be nearly as polished, maintained, or ambitious without your help.

If you’d like to look back on what happened in open source this past year, you can find an overview here: https://blog.michielborkent.nl/tags/oss-updates.html. The core projects remain clj-kondo, babashka, SCI, scittle, and squint/cherry. Each of them continues to grow in capability and adoption.

I’ve also applied for Clojurists Together again for 2026. If you’re a CT sponsor, a vote in the next long-term funding round would be appreciated.

@borkdude
borkdude / reagami+scittle.html
Created November 16, 2025 12:45
reagami in scittle
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/scittle.js" type="application/javascript"></script>
<script type="application/x-scittle">
(defn js-in "Patch for `js-in` missing in scittle"
[k v]
(js/Object.hasOwn v k))
(intern 'clojure.core 'js-in js-in)
</script>
<script type="application/x-scittle" src="https://raw.githubusercontent.com/borkdude/reagami/refs/heads/main/src/reagami/core.cljc"></script>
(ns test1
(:require
[applied-science.js-interop :as j]
[promesa.core :as p]
[cljs-bean.core :refer [bean ->clj ->js]]
[re-frame.core :as rf]
[re-frame.db :as rf.db]
[re-frame.alpha :as rf.a]
[reagent.core :as r]
[reagent.dom.server :as rds]
@borkdude
borkdude / ohm.cljs
Created October 27, 2025 07:56
Ohm's calculator
(ns reagami.core
{:clj-kondo/config '{:linters {:unresolved-symbol {:exclude [update!]}}}})
(def svg-ns "http://www.w3.org/2000/svg")
(defn- parse-tag
"From hiccup, thanks @weavejester"
[^String tag]
(let [id-index (let [index (.indexOf tag "#")] (when (pos? index) index))
class-index (let [index (.indexOf tag ".")] (when (pos? index) index))]
@borkdude
borkdude / reagami.cljs
Created October 26, 2025 12:45
Reagami ported to CLJS
(ns reagami.core
{:clj-kondo/config '{:linters {:unresolved-symbol {:exclude [update!]}}}})
;; array-seq didn't exist in scittle
(defn array-seq [x]
(into [] x))
(def svg-ns "http://www.w3.org/2000/svg")
(defn- parse-tag
@borkdude
borkdude / my_hoplon_demo.cljs
Last active October 3, 2025 21:15
my_hoplon_demo.cljs
(ns test1
(:require
[hoplon.core :as h]
[javelin.core :as j]))
(h/defelem timer [attrs children]
(let [start (or (:start attrs) 0)
seconds (j/cell start)]
(.setInterval js/window #(swap! seconds inc) 1000)
(h/div attrs (j/cell= (str "Seconds Elapsed: " seconds)))))
@borkdude
borkdude / simple.clj
Created September 6, 2025 08:39
clj-simple-router with babashka
(require '[babashka.deps :as deps])
(deps/add-deps '{:deps {io.github.tonsky/clj-simple-router {:mvn/version "0.1.2"}}})
(require '[org.httpkit.server :as server]
'[clj-simple-router.core :as router])
(def routes
(router/routes
"GET /" []
@borkdude
borkdude / tictactoe.cljs
Created December 14, 2023 18:57
squint_react_tictactoe.cljs
(require '["react" :as react])
(require '["react-dom" :as rdom])
(def empty-board [[\- \- \-]
[\- \- \-]
[\- \- \-]])
(def init-state {:board empty-board :player \X})
(defn get-board-cell
@borkdude
borkdude / aoc23_01.cljs
Last active December 7, 2023 19:53
AOC 2023 day 3 in squint + TC39 Tuples
;; Helper functions:
;; (fetch-input year day) - get AOC input
;; (append str) - append str to DOM
;; (spy x) - log x to console and return x
;; original solution:
;; https://github.com/russmatney/advent-of-code/blob/master/src/_2023/_03/core.clj
(require '["https://unpkg.com/@bloomberg/record-tuple-polyfill" :as tc39])
@borkdude
borkdude / aoc_ui.cljs
Last active December 5, 2023 16:15
AOC ui boilerplate
(require '[clojure.string :as str])
#_(assoc-in! (js/document.querySelector "#compiledCode") [:style :display] :none)
(when-not (js/document.querySelector "#aoc_token")
(let [create-element (fn create-element [tag attributes]
(let [element (js/document.createElement tag)]
(doseq [[key value] attributes]
(aset element key value))
element))