Skip to content

Instantly share code, notes, and snippets.

@taylorSando
taylorSando / material-ui-reagent.clj
Created March 12, 2015 04:10
Material UI Reagent
;; material-ui.macros.clj
(ns material-ui.macros)
(def material-tags
'[AppBar
AppCanvas
Circle
Checkbox
DatePicker
DialogWindow
@taylorSando
taylorSando / selector.clj
Created November 1, 2015 20:38
A simple selector
(defn is-predicate-keyword? [k]
(= (last (name k)) (last "?") ))
(reduce
(fn [acc [k v]]
(if (is-predicate-keyword? k)
(if (true? v)
(conj acc (apply str (butlast (name k))))
acc)
acc))
@taylorSando
taylorSando / poller.clj
Last active November 3, 2015 19:48
Email polling
(ns workzone.services.email-poll
(:require [clojure.tools.logging :as log]
[clojure.core.async :as core.async]
[clojure.set]
[workzone.model.error :as model.error]
[plumbing.core :refer :all]
[puppetlabs.trapperkeeper.core :refer [defservice]])
(:import javax.mail.Flags
javax.mail.Message
javax.mail.internet.InternetAddress
@taylorSando
taylorSando / pr-opts.cljs
Created February 8, 2016 15:07
A way to have better function output using pr-str
;; Using defonce, because in a reloaded workflow, only want this to run once
;; Changes the default printing of the javascript source code of a function to just the function name.
;; Changes instances of dollar sign to dot, and underscores to hyphens.
;; cljs$core$pr_str would be cljs.core.pr-str instead
(defonce
ugly-pr-opts-hack
(set!
cljs.core/pr-opts
(let [old-pr-opts (cljs.core/pr-opts) ]
(fn []
@taylorSando
taylorSando / transact.clj
Created May 19, 2016 14:21
A way of enforcing transactions
(ns datomscript.model
(:require #?@(:clj [[datomic.api :as d]
[clojure.tools.logging :as log]])
#?@(:cljs [[datascript.core :as d]])
[clojure.string :as string]
[clojure.walk :as walk]))
(def vconcat (comp vec concat))
(defn get-model [models model-type]

Keybase proof

I hereby claim:

  • I am taylorSando on github.
  • I am taylorsando (https://keybase.io/taylorsando) on keybase.
  • I have a public key whose fingerprint is FEC4 DC18 F535 B5E3 D634 7926 AEB3 47B5 3773 442E

To claim this, I am signing this object: