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
if exists("g:loaded_syntastic_clojure_nrepl_checker") | |
finish | |
endif | |
let g:loaded_syntastic_clojure_nrepl_checker=1 | |
function! SyntaxCheckers_clojure_nrepl_IsAvailable() | |
return executable('lein') && filereadable('project.clj') | |
endfunction | |
function! SyntaxCheckers_clojure_nrepl_GetLocList() |
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
;;; TODO - drag-enter and -exit events : Right now, a component doesn't receive events for other components | |
;;; If a component responds to drag-over, it won't "revert" state until the drag ends. | |
;; NOTE - compiles with om 0.1.7. Needs updating to 0.2+ | |
(ns omdnd.ux | |
(:require-macros | |
[cljs.core.async.macros :refer [go alt!]] | |
) |
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
{:user {:aliases {"slamhound" ["run" "-m" "slam.hound"]} | |
:plugins [[cider/cider-nrepl "0.6.1-SNAPSHOT"] | |
; swap to actual versions and then use lein ancient instead | |
[lein-git-deps "0.0.1-SNAPSHOT"] | |
[lein-bikeshed "RELEASE"] | |
[lein-kibit "RELEASE"] | |
[jonase/eastwood "RELEASE"] |
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 popover | |
"wrapper for the ReactBootstrap/Popover component" | |
[{:keys [content | |
title | |
data]} owner opts] | |
(reify | |
om/IRender | |
(render [this] | |
(ReactBootstrap/OverlayTrigger #js {:trigger "hover" | |
:placement "top" |
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
(defmacro defntraced | |
"Define a function with it's inputs and output logged to the console." | |
[sym & body] | |
(let [[_ _ [_ & specs]] (macroexpand `(defn ~sym ~@body)) | |
new-specs (map | |
(fn [[args body]] | |
(let [prns (for [arg args] | |
`(js/console.log (str '~arg) "=" (pr-str ~arg)))] | |
(list | |
args |
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
(ns test-check-contrib.gen-uuid | |
(:require [clojure.string] | |
[clojure.test.check :as tc] | |
[clojure.test.check.generators :as gen] | |
[clojure.test.check.properties :as prop] | |
[clojure.test.check.clojure-test :refer [defspec]]) | |
(:import [java.util UUID]) | |
(:require [clojure.core :as core])) | |
(def gen-uuid-simple |
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
[:div | |
[:b "Now that you've submitted your message, you can upload an image of your own, or read the messages"] | |
[:form.form-horizontal {:action "/upload" :method "post" :encType "multipart/form-data"} | |
[:div.form-group | |
[:input.form-control {:name "file" | |
:on-change (fn [e] (om/set-state! owner :can-upload-image true)) | |
:type "file" | |
:size "20"}] | |
[:label.control-label "Who are you?"] | |
[:input.form-control {:name "person"}] |
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
(ns onyx-timeline-example.onyx.component | |
(:require [clojure.core.async :as a :refer [go-loop pipe chan >!! <!! close!]] | |
[clojure.data.fressian :as fressian] | |
[clojure.core.match :as match :refer (match)] | |
[clojure.tools.logging :as log] | |
[com.stuartsierra.component :as component] | |
[onyx.peer.task-lifecycle-extensions :as l-ext] | |
[onyx.extensions :as extensions] | |
[onyx.api] | |
[onyx.plugin.core-async] |
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
(filter even? (range 10)) | |
;; equals | |
(new clojure.lang.LazySeq | |
(fn [] | |
(when-let | |
[s (. clojure.lang.RT | |
(seq (new clojure.lang.LazySeq | |
#(let [b (clojure.lang.ChunkBuffer. 32) |
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
#!/usr/bin/env boot | |
(require '[clojure.string :refer [join]]) | |
(defn -main [& args] | |
(println (join " " ["hello," "world!"])) | |
(System/exit 0)) | |
./hello.boot 8.64s user 0.46s system 383% cpu 2.375 total | |
OlderNewer