Skip to content

Instantly share code, notes, and snippets.

@titogarcia
titogarcia / token_refresh_example.clj
Last active February 24, 2023 20:53
Example on how to implement an OAuth token store in Clojure
;; https://gist.github.com/titogarcia/4f09bcc5fa38fbdc1076954b9a99a8fc
(ns token-refresh-example
(:require [clojure.string :refer [ends-with?]]
[clj-http.client :as http])
(:import [java.time Instant]
[java.time.temporal ChronoUnit]))
;;;; Logging implementation for exercising these tests
@titogarcia
titogarcia / roman.clj
Last active March 15, 2020 11:52
Roman numerals to integer in Clojure
(ns roman
(:require
[clojure.test :refer :all]))
(def roman-letter->int
{\I 1
\V 5
\X 10
\L 50
\C 100