Skip to content

Instantly share code, notes, and snippets.

View JohnDoneth's full-sized avatar

John Doneth JohnDoneth

View GitHub Profile
@agoose77
agoose77 / ayu-mirage.yaml
Last active November 9, 2025 09:51
Alacritty ayu-mirage theme
colors:
# Default colors
primary:
background: '#1f2430'
foreground: '#cbccc6'
bright_foreground: '#f28779'
# Normal colors
normal:
black: '#212733' #
@pchiusano
pchiusano / monads.u
Last active November 27, 2025 19:42
Converting between algebraic effects and monads
-- This gist shows how we can use abilities to provide nicer syntax for any monad.
-- We can view abilities as "just" providing nicer syntax for working with the
-- free monad.
ability Monadic f where
eval : f a -> a
-- Here's a monad, encoded as a first-class value with
-- two polymorphic functions, `pure` and `bind`
type Monad f = Monad (forall a . a -> f a) (forall a b . f a -> (a -> f b) -> f b)
@roman01la
roman01la / react-native-stylesheet.cljs
Last active August 5, 2022 19:31
Access React Native compiled styles map using Clojure's keywords.
(def stylesheet (.-StyleSheet ReactNative))
(defn create-stylesheet [styles]
(->> styles
(clj->js)
(.create stylesheet)
(js->clj)
(clojure.walk/keywordize-keys)))
; usage