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 animate | |
"Request animation frame" | |
(or (.-requestAnimationFrame js/window) | |
(.-oRequestAnimationFrame js/window) | |
(.-mozRequestAnimationFrame js/window) | |
(.-webkitRequestAnimationFrame js/window) | |
(.-msRequestAnimationFrame js/window) | |
(fn [callback] (js/setTimeout callback 17)))) |
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
{:user | |
{:plugins [[lein-kibit "0.0.8"] [lein-bikeshed "0.1.3"] [jonase/eastwood "0.0.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
(ns app.controllers.validation | |
(:require [app.views.a :as a-view] | |
[metis.core :as metis])) | |
;; Validates that the required environment keys are present | |
(metis/defvalidator :environment-validator [[:core-url :db :auth-token] :presence ]) | |
(metis/defvalidator :preview-body-validator [[:type :filter :template :index ] :presence ]) | |
(metis/defvalidator :preview-request-validator [:body :preview-body-validator ]) |
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
(define + | |
(lambda (a b) | |
(cond | |
[(zero? b) a] | |
[else (add1 (+ a (sub1 b)))]))) |
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
class FooBarTest { | |
@Test | |
public "should do foo"() { | |
// ... | |
} | |
@Test | |
public "should do bar"() { | |
// .. |