View core.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 creator.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [om.core :as om :include-macros true] | |
[cljs.core.async :as async :refer [chan <! >! put!]] | |
[om-tools.core :refer-macros [defcomponent]] | |
[cljs.reader :as reader] | |
[goog.dom :as gdom] | |
[om-tools.dom :as dom :include-macros true]) | |
(:import [goog.net XhrIo])) |
View gist:3099717
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 search-log [log term] | |
(with-open [rdr (java.io.BufferedReader. | |
(java.io.FileReader. log ))] | |
(filter #(not (= -1 (.indexOf % term)) | |
(line-seq rdr)))) |
View gist:4136116
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
;; Example: | |
;; (doseq-indexed idx [name names] | |
;; (println (str idx ". " name) | |
(defmacro doseq-indexed-functional [index-sym [item-sym coll] & body] | |
`(doseq [[~item-sym ~index-sym] | |
(map vector ~coll (range))] | |
~@body)) |