View roam_stats_comp.cljs
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 [] |
View days_until_widget.cljs
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] |
View subtractor_resistance.clj
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] |
View simple_current_date_widget.cljs
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" |
View roam_time_since_waking.cljs
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)] |
View block-history-export.cljs
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] |
View regex-search-replace.cljs
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 |