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
(reify FileVisitor | |
(visitFile [_ p attrs] | |
(let [f (.relativize src p) | |
last-mod (Files/getLastModifiedTime p (make-array LinkOption 0))] | |
(when *verbose* (println (str (.toString src) "/" (.toString f)))) | |
(with-open [is (Files/newInputStream p (make-array OpenOption 0))] | |
(copy! (.toString f) is (.resolve dest (.toString f)) last-mod))) | |
FileVisitResult/CONTINUE) | |
(preVisitDirectory [_ p attrs] | |
(Files/createDirectories (.resolve dest (.toString (.relativize src p))) |
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
(defn ->Function | |
[f] | |
(reify java.util.function.Function | |
(apply [_ obj] (f obj)))) | |
(defn future-map | |
[cf f] | |
(.thenApply cf (->Function f))) | |
(defn future->ch | |
([cf] | |
(future->ch cf (async/chan 1) true)) |
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 app.main | |
(:require ["react-dom" :as rdom] | |
[helix.core :as hx :refer [defnc $ <>]] | |
[helix.dom :as d] | |
[helix.hooks :as hooks] | |
[clojure.core.async :as a :refer [go-loop]])) | |
(defnc greeting | |
"A component which greets a user." | |
[{:keys [name]}] |
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
while inotifywait -e modify -r . | |
make test | |
end |
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
(defun cider-tooltip-source () | |
(interactive) | |
(let* ((sym (thing-at-point 'symbol)) | |
(response (cider-nrepl-send-sync-request | |
(list "op" "eval" | |
"code" | |
(format | |
"(do (require 'clojure.repl) (with-out-str (clojure.repl/source %s)))" | |
sym))))) | |
(when-let ((source (nrepl-dict-get response "value"))) |
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
(define (atom? x) (not (pair? x))) | |
(define wrong 'wait) | |
(define the-false-value (cons "false" "boolean")) | |
(define (evaluate e env) | |
(if (atom? e) | |
(cond ((symbol? e) (lookup e env)) | |
((or (number? e) (string? e) (char? e) (boolean? e) (vector? e)) | |
e) | |
(else (wrong "Cannot evaluate" e))) |
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
.collapsible button.collapsible-collapse-handle:after { | |
content: "►"; | |
} | |
.collapsible.collapsed button.collapsible-collapse-handle:after { | |
content: "▼"; | |
} | |
.collapsible .collapsible-collapse-handle { |
NewerOlder