Skip to content

Instantly share code, notes, and snippets.

Anthony Grimes Raynes

Block or report user

Report or block Raynes

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

Keybase proof

I hereby claim:

  • I am Raynes on github.
  • I am raynes ( on keybase.
  • I have a public key whose fingerprint is 115E 8C72 AE1D FBFD D4D8 786B A56A 26A6 72B0 8826

To claim this, I am signing this object:

View when-let-lol.clj
(defroutes chapter-routes
;; Example story-slug: 42-my-first-story
;; Example chapter-slug: 99-introduction
;; (util/parse-uid "42-my-first-story") -> 42
;; (util/parse-uid "99-introduction") -> 99
(GET "/chapters/:chapter-slug" [story-slug chapter-slug]
(when-let [story-uid (util/parse-uid story-slug)]
(when-let [chapter-uid (util/parse-uid chapter-slug)]
(when-let [story (db/find-story-by-uid story-uid)]
(when-let [chapter (db/find-chapter-by-uid chapter-uid)]
View gist:6643618
(defn ?assoc-transform
"(?assoc-transform {:a 1} :a 2 sequential? vector) => {:a [1 2]}"
[m k v test transform]
(let [val (m k)]
(assoc m k
(if-let [okay (test val)]
(transform val v)))))
View gist:5527809
View gist:4188351
(defproject noir-example "0.1.0"
:description "An example of a noir project"
:dependencies [[org.clojure/clojure "1.4.0"]
[noir "1.3.0"]]
:plugins [[lein-ring "0.7.5"]]
:ring {:handler noir-example.server/handler}
:main noir-example.server)
View gist:3907782
Making install in src
/bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -Wall -c -o icns_debug.lo icns_debug.c
/bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -Wall -c -o icns_element.lo icns_element.c
/bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -Wall -c -o icns_family.lo icns_family.c
/bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -Wall -c -o icns_image.lo icns_image.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -Wall -c icns_image.c -fno-common -DPIC -o .libs/icns_image.o
libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -Wall -c icns_family.c -fno-common -DPIC -o .libs/icns_family.o
libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -Wall -c icns_element.c -fno-common -DPIC -o .libs/icns_element.o
libtool: compile: cc -DHAVE_CONFIG_H -I. -I.. -Wall -c icns_debug.c -fno-common -DPIC -o .libs/icns_debug.o
brew: superenv removed: -Wall
View refheap.js
$("#signin").click(function(event) {
alert("SIGN THE FUCK IN.")
View core.clj
(defn ^{:skip-wiki true} route->name
"Parses a set of route args into the keyword name for the route"
(keyword? route) route
(fn? route) (keyword (:name (meta route)))
:else (let [res (first (parse-route [{} [route]] 'compojure.core/GET))]
(keyword (:fn-name res)))))
View #4clojure
<Raynes> amalloy: Also, my pastebin currently has 4clojure's favicon. :p Because the browser had it cached from my testing a few days ago.
<amalloy> Raynes: just rm -rf ~, that should take care of the cached favicon
<Raynes> omg rly im tots gunna tr that
<Raynes> amalloy: omgwtf u delted my home [22:44]
<amalloy> Raynes: i should totally have done like a sudo mv ~raynes /tmp/lol-stole-it
View *slime-repl nil*
refheap.models.paste> (binding [session/*noir-session* (atom {})] (paste {:description "A paste." :language "Haskell" :contents "main = putStrLn \"Hello, World!\""}))
{:paste-id 6, :user "anonymous", :description "A paste.", :language "Haskell", :contents "<div class=\"highlight\"><pre><span class=\"nf\">main</span> <span class=\"ow\">=</span> <span class=\"n\">putStrLn</span> <span class=\"s\">&quot;Hello, World!&quot;</span>\n</pre></div>\n", :_id #<ObjectId 4ef6675cd6c4de4c8a84efed>}
You can’t perform that action at this time.