Skip to content

Instantly share code, notes, and snippets.

View micmarsh's full-sized avatar

Michael Marsh micmarsh

View GitHub Profile
DROP TABLE test_notes;
DROP TABLE billing_discount_notes;
drop table billing_notes;
DROP TABLE billing_discounts;
CREATE TABLE billing_notes (
id SERIAL PRIMARY KEY,
note text,
created TIMESTAMP WITHOUT TIME ZONE,
updated TIMESTAMP WITHOUT TIME ZONE
@micmarsh
micmarsh / seeded_random.clj
Last active March 28, 2025 20:49
Utilities that I always end up implementing in an exploratory phase, before deciding that test.check is better
(defn rand-int'
([seed] (rand-int' seed Integer/MAX_VALUE))
([seed upper] (rand-int' seed 0 upper))
([seed upper min]
(-> (hash seed)
(Math/abs)
(mod (- upper min))
(+ min)
(dec))))
@micmarsh
micmarsh / Kleisli.cs
Last active September 26, 2025 15:34
// Requires LanguageExt V5
using LanguageExt;
using LanguageExt.Traits;
namespace Kleisli;
public readonly record struct Kleisli<M, A, B>(Func<A, K<M, B>> Invoke) : K<Kleisli<M, A>, B>, K<CoKleisli<M, B>, A>
where M : Monad<M>
{
@micmarsh
micmarsh / ThanksAI.md
Created December 30, 2025 21:10 — forked from richhickey/ThanksAI.md
Thanks AI!

Thanks AI!

I got this email:

Rich,

Your creation of Clojure ...

sycophantic blather worthy of a third grader's homework assignment to write a letter to a public figure you don't know, using sources you don't understand, to express an emotion unfelt, with no intention whatsoever >