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
View *slime-repl nil*
refheap.models.paste> (binding [session/*noir-session* (atom {})] (paste {:description "A paste." :language "Nimrod" :contents "proc notAComment2() = return"}))
{:paste-id 5, :user "anonymous", :description "A paste.", :language "Nimrod", :contents "", :_id #<ObjectId 4ef666d0d6c4de4c8a84efec>}
View *slime-repl nil*
user> (pygmentize "clojure" "(+ 3 3)")
"<div class=\"highlight\"><pre><span class=\"p\">(</span><span class=\"nb\">+ </span><span class=\"mi\">3</span> <span class=\"mi\">3</span><span class=\"p\">)</span>\n</pre></div>\n"
View problems.clj
[foreclojure.utils :only [from-mongo get-user get-solved login-link
flash-msg flash-error row-class approver?
can-submit? send-email image-builder if-user
with-user as-int maybe-update escape-html]]
View run.clj
(require '[noir.session :as session])
(use 'noir.core)
(use 'noir.server)
(defpage "/put" [] (session/flash-put! :foo "1") (pr-str @session/*noir-flash*))
(defpage "/take" [] (prn (session/flash-get :foo)) (pr-str @session/*noir-flash*))
(def s (start 8080))
View core.clj
(ns crisis.core)
(defn crisis [x]
(println x))
(defn -main [& args]
(crisis "Hello, World!"))
(set! *main-cli-fn* -main)
@Raynes
Raynes / exc
Created Dec 16, 2011
exceptional
View exc
Exception in thread "main" clojure.lang.ArityException: Wrong number of args (0) passed to: core$fnil$fn
at clojure.lang.AFn.throwArity(AFn.java:437)
at clojure.lang.RestFn.invoke(RestFn.java:399)
at clojure.core$reduce.invoke(core.clj:5992)
at foreclojure.mongo$reconcile_solved_count.invoke(mongo.clj:59)
at foreclojure.mongo$prepare_mongo.invoke(mongo.clj:68)
at user$eval2508.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:6465)
at clojure.lang.Compiler.eval(Compiler.java:6431)
at clojure.core$eval.invoke(core.clj:2795)
View *slime-repl nil*
foreclojure.feeds> (create-feed "foo" "bar" "baz" "quux" [:x "y"])
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\"><channel><atom:link href=\"quux\" rel=\"self\" type=\"application/rss+xml\"/><title>foo</title><link>bar</link><description>&lt;![CDATA[baz]&gt;</description><x>y</x></channel></rss>"
View *slime-repl nil*
fs.core> (parents "/alans/father/is/named/kirby")
(#<File /alans/father/is/named> #<File /alans/father/is> #<File /alans/father> #<File /alans> #<File />)
You can’t perform that action at this time.