I hereby claim:
- I am devn on github.
- I am devn (https://keybase.io/devn) on keybase.
- I have a public key whose fingerprint is C1FC 786D C713 AFC5 CE9F 41E8 8233 12B2 4DA1 AA3D
To claim this, I am signing this object:
| (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 |
| ;; | |
| ;; 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:" |
I hereby claim:
To claim this, I am signing this object:
| (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 |
| (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] |
| {: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"}} |
| (extend-type js/RegExp | |
| cljs.core.IFn | |
| (-invoke ([this s] (re-matches this s)))) | |
| (#"foo.*" "foobar") ;=> "foobar" | |
| (#"zoo.*" "foobar") ;=> nil | |
| (filter #".*foo.*" ["foobar" "goobar" "foobaz"]) ;=> ("foobar" "foobaz") |
| (extend-type js/RegExp | |
| cljs.core.IFn | |
| (-invoke ([this s] (re-matches this s)))) | |
| (#"foo.*" "foobar") ;=> "foobar" | |
| (#"zoo.*" "foobar") ;=> nil | |
| (filter #".*foo.*" ["foobar" "goobar" "foobaz"]) ;=> ("foobar" "foobaz") |
| (ns clojure.walk.useful | |
| (:require [clojure.walk :refer (postwalk)])) | |
| (defn transform-keys | |
| "Recursively transforms all keys in map `m` which return true for | |
| a function `pred` by applying a function `f` to them." | |
| [m pred f] | |
| (let [func (fn [[k v]] (if (pred k) [(f k) v] [k v]))] | |
| (postwalk (fn [x] (if (map? x) (into {} (map func x)) x)) m))) |