-
Start/Stop of all (7) CR3 Servies:
- confusion (vagrant & rackup)
- randr
- rnr_ui w/ tunnel
- portal w/ tunnel
-
Also layout w/in console
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
(def ->num {[" " | |
" |" | |
" |" | |
" "] 1 | |
[" _ " | |
" _|" | |
"|_ " | |
" "] 2 | |
[" _ " | |
" _|" |
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
(defmacro ->j-fn [j-fn] | |
(let [args (gensym "args")] | |
`(fn [~args] | |
(eval (cons '~j-fn (if (coll? ~args) ~args (list ~args))))))) | |
;trivial | |
((->j-fn .length) "foo") | |
;useful, since you can't do (map .length ["foo" "bar"]) | |
(map (->j-fn .length) ["foo" "bar"]) |
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
(let [foo {:Error "an error"} | |
baz {:Info {:RowsUpdated "some info"}}] | |
(condp #(get-in %2 %1) baz | |
[:Info :RowsUpdated] :>> (fn [msg] {:msg msg}) | |
[:Error] :>> (fn [msg] {:msg msg}))) | |
#_(pred test-expr expr) |
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 flip [f] | |
"Create a function of f, with the argument order reversed" | |
(fn [& args] | |
(apply f (reverse args)))) | |
((flip get-in) [:foo :bar] {:foo {:bar "foo bar"}}) | |
;=> "foo bar" |
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 timbre-test.core | |
(:require [taoensso.timbre.profiling :as profiling :refer (p profile)])) | |
;; Profile partial vs #/fn | |
(let [padd (partial + 5) | |
fadd (fn [n] (+ 5 n)) | |
aadd #(+ % 5)] | |
(defn add-them-all [num] | |
(p :partial (padd num)) |
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
!/bin/bash | |
# paths | |
CONFUSION_ROOT=~/primedia/confusion | |
RANDR_ROOT=~/primedia/randr | |
RNRUI_ROOT=~/primedia/rnr_ui | |
PORTAL_ROOT=~/primedia/portal | |
PROXY_ROOT=~ | |
PROXY_APP=ngrok |
- We've been evaluating full-stack Clojure options
- Compelling video Brian sent out - http://www.youtube.com/watch?v=jj6eQieGWqo
- Client-side presentation (templating) library -- more about DOM transforms
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 test-app.core) | |
(defn do-it-slow! | |
[sleep-time] | |
(Thread/sleep sleep-time)) | |
(defn mk-future | |
[sleep-time] | |
(future (do-it-slow! sleep-time))) |
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
(*' Long/MAX_VALUE 2) | |
(* Long/MAX_VALUE 2) |
OlderNewer