Skip to content

Instantly share code, notes, and snippets.

Sam Ritchie sritchie

Block or report user

Report or block sritchie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View viewbug
// Our file contains this:
_design/event-entry
// But the editor view shows this:
_design/event-entry<span class="no-nl-marker octicon octicon-no-newline tooltipped upwards" original-title="No newline at end of file"></span>
Looks like it's not rendering that HTML as that little red arrow, but just jamming it inline.
View gist:8866600
<div id="scripts">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script><script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js" type="text/javascript"></script><script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js" type="text/javascript"></script><script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false" type="text/javascript"></script><script src="/cljs/reset-codes.js" type="text/javascript"></script><script src="/cljs/paddleguru.js" type="text/javascript"></script><script src="/cljs/bootstrap3-typeahead.min.js" type="text/javascript"></script><script src="/cljs/tablesort.js" type="text/javascript"></script><script src="/cljs/table-filter.js" type="text/javascript"></script><script src="/cljs/placeholders.min.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.8.0/react.js" type="text/javascript"></script><script src="/clj
View repl.clj
(defn start! []
(when-let [browser-repl-env (u/maybe-resolve cemerick.austin.repls
browser-repl-env)]
(when-let [cljs-repl (u/maybe-resolve cemerick.austin.repls cljs-repl)]
(when-let [repl-env (u/maybe-resolve cemerick.austin repl-env)]
(cljs-repl (reset! browser-repl-env (repl-env)))))))
View finisherrow.clj
(defn header-row []
(kioo/component "public/html/timing.html"
[:table.finishers :thead]
{[:td.event-column] (kioo/substitute nil)}))
(defn finisher-rows []
(kioo/component "public/html/timing.html"
[:table.finishers]
{[:thead] (kioo/content header-row)
[:tbody] (kioo/content
View bijection.scala
[info] Compiling 25 Scala sources and 2 Java sources to /Users/sritchie/code/scala/bijection/bijection-core/target/scala-2.9.3/classes...
[warn] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[warn] 1 warning
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.9.3 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_40).
Type in expressions to have them evaluated.
Type :help for more information.
scala> import com.twitter.bijection.Conversion.asMethod
View mandrill.clj
(ns paddleguru.util.mandrill
"Methods for interacting with the Mandrill API."
(:require [cheshire.core :as json]
[clojure.core.async :as a]
[org.httpkit.client :as http]
[paddleguru.config :as conf]
[paddleguru.schema :refer [Channel]]
[paddleguru.util :refer [collectify]]
[schema.core :as s]
[taoensso.timbre :as log])
View unnest.clj
;; First stab an unnesting.
(defn fixed-point [f seed eq]
(letfn [(eval-guess [guess]
(let [next-guess (f guess)]
(if (eq guess next-guess)
guess
(eval-guess next-guess))))]
(eval-guess seed)))
View keybase.md

Keybase proof

I hereby claim:

  • I am sritchie on github.
  • I am sritchie (https://keybase.io/sritchie) on keybase.
  • I have a public key whose fingerprint is 8E4B 88F4 2947 96D3 EE7A 7576 B50A 15F7 EA9F EC70

To claim this, I am signing this object:

View request_method.clj
(ns paddleguru.middleware.request-method
(:require [clojure.string :as st]))
(defn ensure-request-method
"Middleware to ensure that the request method is properly processed
out of the form params. Without this, any ':delete' post that hits a
liberator endpoint will be processed as a :post.
(Compojure only processes this form-params field when you explicitly
list a route as (DELETE theroute [] handler).)"
View stripe.cljx
(ns paddleguru.schema.stripe
(:require [paddleguru.util :as u]
[paddleguru.schema :as ps]
[schema.core :as s]))
(def ChargeID
(s/named s/Str "Charge identifier."))
(def CustomerID
(s/named s/Str "The identifier of the customer to be retrieved."))
You can’t perform that action at this time.