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
(require '[ring.middleware.session] | |
'[manifold.deferred :as d]) | |
(defn wrap-ring-async-handler | |
"Converts given asynchronous Ring handler to Aleph-compliant handler." | |
[handler] | |
(fn [request] | |
(let [response (d/deferred)] |
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
((nil | |
(cider-clojure-cli-global-options . "-A:cider") | |
(cider-default-cljs-repl . figwheel-main) | |
(cider-figwheel-main-default-options . ":dev"))) | |
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
TRACE t7890: (figwheel.main/-main "-b" "dev" ...) | |
TRACE t7891: | (figwheel.main/get-edn-file-key "figwheel-main.edn" :log-level) | |
TRACE t7892: | | (figwheel.main/get-edn-file-key "figwheel-main.edn" :log-level ...) | |
TRACE t7892: | | => nil | |
TRACE t7891: | => nil | |
TRACE t7893: | (figwheel.main/fix-simple-bool-args # #) | |
TRACE t7893: | => ("-b" "dev" "-r") | |
TRACE t7894: | (figwheel.main/validate-cli! #) | |
TRACE t7895: | | (figwheel.main/get-edn-file-key "figwheel-main.edn" :validate-cli ...) | |
TRACE t7895: | | => true |
Shown at Feb '14 Den of Clojure
So you've read the blogs and thought how fun it would be to write web front ends with your favorite lisp. Perhaps you've even fired up the repl and done a little playing. But how do you get from there to a
Two terminal windows open, one with a bunch of long running watch tasks, the other with an editor. Each of the terminals is a view into one of two windows in a tmux session. Useful for having a vertically split screen with editor on right, and switching between a browser and other command windows on the left.
In first terminal:
tmux new-session -s first
tmux rename-window editor
emacs
or whatever
In second terminal:
tmux new-session -t first -s second
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
(require '[clara.rules.durability.fressian :as cf] | |
'[clara.rules.platform :as pform] | |
'[clara.rules.durability :as d] | |
'[clojure.data.fressian :as fres] | |
'[clojure.core.async :as async] | |
'[clojure.java.io :as io]) | |
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
;; using | |
;; https://github.com/dimovich/fressian-handlers/blob/caching/src/fressian/handlers.clj | |
(require '[fressian.handlers :as fh] | |
'[clojure.data.fressian :as fres] | |
'[clojure.core.async :as async] | |
'[clojure.java.io :as io]) | |
(def ch (async/chan)) |
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
;; use with deps.edn | |
;; {:aliases {:sass {:main-opts ["-i sass.clj -m figwheel.main -b dev"]}}} | |
(require '[clojure.java.shell :as sh] | |
'[figwheel.main.watching :as fww]) | |
(println "watching Sass...") | |
;; change comand and location of sass files as needed |
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
;; I'm running the clj command inside this project: | |
;; https://github.com/dimovich/deps-cider-cljs-reagent | |
;; clj -R:figwheel -C:figwheel -Sdeps '{:deps {org.clojure/tools.trace {:mvn/version "0.7.10"}}}' -i trace.clj -m figwheel.main -b dev -r | |
(ns user) | |