Skip to content

Instantly share code, notes, and snippets.

Avatar

Bryan Maass escherize

View GitHub Profile
View rum-temp-example.cljs
(ns surgical.examples.temperature-change
(:require [rum.core :as rum]))
;; Compare to
;; https://facebook.github.io/react/docs/lifting-state-up.html
(defonce app-state (atom {:temp "0" :scale :f}))
(def scale-names {:f "Farienheit" :c "Celcius"})
(defn ->celcius [far] (* (- far 32) (/ 5 9)))
View cljs-nrepl.diff
Unstaged
modified transmit-client/dev/fe_figwheel.clj
@@ -7,7 +7,12 @@
(def fe-config
(as-> (:data master-config) $
- (merge $ {:figwheel-options {:server-port 3460 :css-dirs ["app/resources/public/css"]}
+ (merge $ {:figwheel-options {:server-port 3460
+ :css-dirs ["app/resources/public/css"]
+ :nrepl-port 7666
View bowling.clj
(ns scratch.bowling
(:require [clojure.core.match :refer [match]]))
(def strike? #(= (first %) \X))
(defn ->n [n] ((zipmap [\- \1 \2 \3 \4 \5 \6 \7 \8 \9 \X] (range 11)) n "/"))
(defn ->frames [game-str]
(loop [frames [] trials game-str]
(if-not (empty? trials)
(recur (conj frames (take 3 trials))
View app.clj
(ns cljs-horizon.app
(:require [reagent.core :as reagent :refer [atom]]
[clojure.string :as str]))
;; horizon library
(def horizon (js/Horizon))
;; db table
(def chat (horizon "messages_four"))
View random2016-05-02.org

Resume

Projects

TextMeTheLink.com

SaaS to help companies and individuals aquire downloads for their app.

We provide a textbox widget where visitors can enter their phone number and recieve a text message with a link to our clients’ app on the App Store or Google Play Store.

Also a ClojureScript SPA

cljs fiddle

Static app which runs a full featured ClojureScript compiler (cljs-in-cljs) in the browser.

Ability to save and load fiddles by (ab)using github gists.

Slides availiable at escherize.com/cljsfiddle_talk

View *cider-error*.txt
Show: Clojure Java REPL Tooling Duplicates All (15 frames hidden)
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling src/one-love-sample/core.clj at (4:1)
Compiler.java: 7391 clojure.lang.Compiler/load
REPL: 1 user/eval21954
REPL: 1 user/eval21954
Compiler.java: 6927 clojure.lang.Compiler/eval
View *cider-error*.txt
Show: Clojure Java REPL Tooling Duplicates All (28 frames hidden)
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling one/love/command/ast.clj at (54:1)
Compiler.java: 7239 clojure.lang.Compiler/load
RT.java: 371 clojure.lang.RT/loadResourceScript
RT.java: 362 clojure.lang.RT/loadResourceScript
RT.java: 446 clojure.lang.RT/load
View *cider-error*.txt
Show: Clojure Java REPL Tooling Duplicates All (22 frames hidden)
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling one/love/command.clj at (1:1)
core.clj: 5630 clojure.core/throw-if
RestFn.java: 442 clojure.lang.RestFn/invoke
core.clj: 5716 clojure.core/load-lib
RestFn.java: 142 clojure.lang.RestFn/applyTo
View signup.clj
(defn fake-signup-view []
(let [debug? (subscribe [:debug?])
loading? (subscribe [:loading?])
email-taken? (subscribe [:email-taken?])
signup-form-data (subscribe [:signup-form])
email (reaction (:email @signup-form-data))
first-name (reaction (:first-name @signup-form-data))
last-name (reaction (:last-name @signup-form-data))
password (reaction (:password @signup-form-data))]
(fn []
View signup.clj
(defn fake-signup-view []
(let [debug? (subscribe [:debug?])
loading? (subscribe [:loading?])
email-taken? (subscribe [:email-taken?])
signup-form-data (subscribe [:signup-form])
email (reaction (:email @signup-form-data))
first-name (reaction (:first-name @signup-form-data))
last-name (reaction (:last-name @signup-form-data))
password (reaction (:password @signup-form-data))]
(fn []
You can’t perform that action at this time.