- Get evaluation license key : http://my.datomic.com/eval/request
- Download pro version : http://downloads.datomic.com/pro.html
- Dev mode setup
| {:database {:classname "org.postgresql.Driver" | |
| :subprotocol "postgresql" | |
| :database "YOURUNIQUESTRING" | |
| :host "ec2-123-456-789.compute-1.amazonaws.com" | |
| :port 5432 | |
| :user "postgres_username" | |
| :ssl true | |
| :sslfactory "org.postgresql.ssl.NonValidatingFactory" | |
| :password "postgres_password"}} |
| (ns defjam.core) | |
| (defn __verb [__noun __noun_place] | |
| (filter #{__noun} __noun_place)) | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| (ns defjam.dude | |
| (:require [clojure.java.io :as io] | |
| [clojure.string :as str] |
| (defn write-file [filename file] | |
| (with-open [w (clojure.java.io/output-stream filename)] | |
| (.write w (:body file)))) | |
| (let [base-uri "http://google.com" | |
| img-path (-> (get-page base-uri) | |
| (first-by-xpath "//img[@alt='Google']") | |
| (comp :src attrs)) | |
| img-url (str base-uri img-path)] | |
| (->> (clj-http.client/get img-uri {:as :byte-array |
I hereby claim:
To claim this, I am signing this object:
| ;; | |
| ;; paths | |
| ;; | |
| (setq system-uses-terminfo nil) | |
| (add-to-list 'exec-path (expand-file-name "~/bin")) | |
| (add-to-list 'exec-path (expand-file-name "/usr/local/bin")) | |
| (setenv "PATH" (concat (expand-file-name "~/bin") | |
| ":/usr/local/bin:" |
| (defsynth pitch-follow-1 [] | |
| (let [in (mix [(sound-in)]) | |
| amp (amplitude:kr in 0.05 0.05) | |
| [freq has-freq] (pitch:kr in | |
| :amp-threshold 0.02 | |
| :median 7) | |
| out-1 (mix [(var-saw:ar (mul-add:ar 0.5 1 2) | |
| 0 | |
| (lf-noise1:kr (mul-add:kr 0.3 0.1 0.1)))]) | |
| out-2 (loop [n 6 |
| (defn gen-nonvariadic-invokes [f] | |
| (for [arity (range 1 21), | |
| :let [args (repeatedly arity gensym)]] | |
| `(~'invoke [~@args] (~f ~@args)))) | |
| (defn gen-variadic-invoke [f] | |
| (let [args (repeatedly 22 gensym)] | |
| `(~'invoke [~@args] (apply ~f ~@args)))) | |
| (defn gen-apply-to [f] |
| ;; http://notahat.com/midi_patchbay/ | |
| ;; Create a virtual input and virtual output in MIDI patchbay | |
| ;; input name: "Overtone" | |
| ;; output name: "yourchoice" | |
| ;; In Reason, Ableton, etc. select "yourchoice" | |
| ;; as the midi input for a channel. | |
| (ns jam.core | |
| (:use [overtone.live])) |
| (require '[clojure.walk :as walk]) | |
| ;; => nil | |
| (defn transient? [x] | |
| (instance? clojure.lang.ITransientCollection x)) | |
| ;; => #'user/transient? | |
| (let [transients (walk/postwalk (fn [x] | |
| (if (map? x) | |
| (transient x) |