This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns subtractor-resistance | |
(:require | |
[babashka.fs :as fs] | |
[clojure.pprint :as pp] | |
[clojure.string :as str] | |
;; [clojure.core.async :as async :refer [go <!]] | |
[clojure.java.io :as io] | |
[babashka.process :as proc :refer [process sh]] | |
#?@(:bb [[babashka.deps :as deps]] | |
:clj [[oz.core :as oz] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.luisthiamnye.roam-render.simple-current-date-widget) | |
(defn date-widget [_] | |
[:span {:style {:color "#31495E" | |
:font-size "17px"}} | |
"Today: " | |
[:b | |
(let [d (js/Date.)] | |
(str (.toLocaleDateString d "en-GB" | |
#js {:weekday "short" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.luisthiamnye.roam-render.days-until | |
(:require | |
[roam.datascript :as d] | |
[clojure.string])) | |
(defn inherited-uids [uid] | |
(d/q '[:find [?uids ...] | |
:in $ ?uid | |
:where | |
[?b :block/uid ?uid] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.luisthiamnye.roam-render.waking-time | |
(:require | |
[reagent.core :as r])) | |
(def default-hour 7) | |
(def default-minute 30) | |
(defn time-since [date] | |
(let [mins (/ (- (js/Date.) date) | |
1000 60)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns block-chart | |
(:require | |
[clojure.string] | |
[reagent.core :as r] | |
[roam.datascript :as d])) | |
(defn string-bytes [s] | |
(.-size (js/Blob. [s]))) | |
(defn totals [coll] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns regex-replace.core | |
(:require | |
[roam.block :as block] | |
[roam.datascript :as d] | |
[reagent.core :as r] | |
[clojure.string])) | |
(defn block-replace-txs [match replacement] | |
(into [] | |
(comp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns roam-stats | |
(:require | |
[roam.datascript :as d] | |
[clojure.string] | |
[reagent.core :as r])) | |
(defn string-bytes [s] | |
(.-size (js/Blob. [s]))) | |
(defn total-pages [] |