A Pen by Captain Anonymous on CodePen.
This file contains hidden or 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
| $ lein apraxis | |
| Using i18n 0.7.0 | |
| Using json 1.8.3 | |
| Using minitest 5.8.2 | |
| Using thread_safe 0.3.5 | |
| Using tzinfo 1.2.2 | |
| Using activesupport 4.2.4 | |
| Using addressable 2.3.8 | |
| Using atomic 1.1.99 | |
| Using backports 3.6.6 |
This file contains hidden or 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 config-files | |
| "Returns a sequence of configuration files | |
| that should be loaded by Immuconf." | |
| ([] | |
| (config-files (env :environment))) | |
| ([current-env] | |
| (let [converter (comp (map (partial str "config/")) | |
| (map io/resource) | |
| (remove nil?)) |
This file contains hidden or 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
| {} |
This file contains hidden or 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
| [azjure "1.0.0-20140814.201738-3"] | |
| [org.clojure/math.numeric-tower "0.0.4"] | |
| [org.ozias.cljlibs/utils "0.1.7"] | |
| [me.raynes/conch "0.6.0"] | |
| [org.flatland/useful "0.10.6"] | |
| [org.clojure/tools.macro "0.1.1"] | |
| [ch.qos.logback/logback-classic "1.1.3" :exclusions [[org.slf4j/slf4j-api]]] | |
| [ch.qos.logback/logback-core "1.1.3"] | |
| [cheshire "5.5.0"] | |
| [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.5.3"] |
Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.
This example uses Figwheel as something that you want to exclude for production, but the pattern is general.
With this simple setup you only need one html file/view and it will work for developement and production.
This file contains hidden or 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
| ;; Export | |
| (setq org-html-validation-link nil) | |
| (setq org-export-html-postamble nil) | |
| ;; File handling | |
| (setq org-directory "~/Documents/notes") | |
| (setq org-default-notes-file (concat org-directory "/default.org")) | |
| (setq org-log-done 'time) | |
| ;; TODO |
This file contains hidden or 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 recursive-take | |
| "Recursively take from a list based on the operation list | |
| For example [:h :l :l :h] will take using the following operations | |
| until the list is exhausted: first last last first." | |
| [col operations] | |
| (loop [c col ops (cycle operations) acc []] | |
| (if (empty? c) | |
| acc | |
| (let [op (first ops) | |
| [head-fn tail-fn] (if (= op :h) |
A Pen by Christian Romney on CodePen.
A hopefully short and concise explanation as to how Clojure deals with Objects. If you already write Clojure, this isn't for you.
You know what an Interface is if you write/read Java or PHP 5+. In Clojure it might be called defprotocol.
user> (defprotocol IABC
(also-oo [this])
(another-fn [this x]))IABC