Skip to content

Instantly share code, notes, and snippets.

@rothfield
rothfield / actiontext_in_rails7
Last active January 10, 2022 20:39
Rails7 actionscript
Steps for Actiontext demo
-------------------------
gem install rails -v 7.0.1
rails new actiontext_demo -v 7.0.1
cd actiontext_demo
bundle
@rothfield
rothfield / gist:a4948c51530434b576de
Created May 6, 2015 02:54
goog.net.NetworkTester is broken
callback=function(z) { console.log("hi",z);}
new goog.net.NetworkTester(callback).start()
// Prints: hi false to the javascript console
(defn wrap-dir-index [handler]
(fn [req]
(handler
(update-in req [:uri]
#(if (= "/" %) "/index.html" %))))
@rothfield
rothfield / core.clj
Created November 26, 2013 22:49 — forked from anonymous/core.clj
(ns doremi_script_clojure.core
[doremi_script_clojure.to_lilypond :refer [to-lilypond]]
[clojure.java.io :refer [input-stream resource]]
[clojure.data.json :as json]
[clojure.pprint :refer [pprint]]
))
(defn -json_text_to_lilypond[txt]
"Takes parsed doremi-script json data as text"