I hereby claim:
- I am teaforthecat on github.
- I am teaforthecat (https://keybase.io/teaforthecat) on keybase.
- I have a public key ASB1dfXKtsulaHTXHgRPQC4pzMzpu2CbqIJGJOEw2whMcwo
To claim this, I am signing this object:
| (defn detect-controls [{:keys [enter escape]}] | |
| (fn [keypress] | |
| (case (.-which keypress) | |
| 13 (enter) | |
| ;; chrome won't fire 27, so use on-blur instead | |
| 27 (escape) | |
| nil))) | |
| (defn field [form-type identifier attr html-attrs] | |
| (let [path [:editable form-type identifier :inputs attr] |
I hereby claim:
To claim this, I am signing this object:
| (def consumer-registry (atom {})) | |
| (defn get-or-create-message-stream [topic] | |
| (if-let [message-stream (get @consumer-registry topic)] | |
| message-stream | |
| (let [[cnsmr messages] (kafka/open-consumer "consumer-registry" topic) | |
| new-message-stream (ms/->source messages)] | |
| ;; create lifespan for consumer of 1 minute, should probably be a component | |
| (a/go (a/<! (a/timeout 60e3 )) | |
| (kafka/shutdown cnsmr) |
| (ns bones.jobs | |
| " given a symbol and config, build all components of an onyx job | |
| with three tasks kafka-input->function->kafka-output | |
| (def x.y/fn [s] (str s \"-yo\")) | |
| (api/submit-jobs (bones.jobs/build-jobs {} [:x.y/fn])) | |
| (kafka/produce \"x.y..fn-input\" \"hello\") | |
| (kafka/consume \"x.y..fn-output\") => \"hello-yo\" | |
| ") | |
| (defn topic-reader [^String topic] |
| (defn consumer-config [] {"zookeeper.connect" "localhost:2182" | |
| "group.id" (str (java.util.UUID/randomUUID)) | |
| "auto.offset.reset" "smallest" | |
| "auto.commit.enable" "false"}) | |
| (defn fetch-first [topic] | |
| (with-resource [c (zk/consumer (consumer-config))] | |
| zk/shutdown | |
| (first (zk/messages c topic)))) |
| (defun comment-sexp--raw () | |
| "Comment the sexp at point or ahead of point." | |
| (pcase (or (bounds-of-thing-at-point 'sexp) | |
| (save-excursion | |
| (skip-chars-forward "\r\n[:blank:]") | |
| (bounds-of-thing-at-point 'sexp))) | |
| (`(,l . ,r) | |
| (goto-char r) | |
| (skip-chars-forward "\r\n[:blank:]") | |
| (save-excursion |
| ;; not working: service is not found in services; | |
| (let ((service (prodigy-define-service | |
| :name "* head *" | |
| :cwd "~/.emacs.d/lisp" | |
| :command "head" | |
| :args '("my-functions.el") | |
| )) | |
| ) | |
| (prodigy-start-service service)) |
| ;; implicit upsert due to unique constraint on message | |
| ;; temp id will get replaced with real id if message exists | |
| (defn upsert-message-tx [greeting] | |
| (let [tempid (d/tempid :db.part/user -1 )] | |
| [{ :db/id tempid | |
| :greeting/message greeting} | |
| [:inc tempid :greeting/hit-count 1]])) |
| (defproject intrepid-life-coffee "0.1.0-SNAPSHOT" | |
| :description "website to advertise the coffee shop" | |
| :url "www.intrepidlifecoffee.com" | |
| :license {:name "Eclipse Public License" | |
| :url "http://www.eclipse.org/legal/epl-v10.html"} | |
| :dependencies [[org.clojure/clojure "1.5.1"] | |
| [compojure "1.1.6"] | |
| [ring "1.2.1"] | |
| [hiccup "1.0.5"] | |
| ;; [org.slf4j/log4j-over-slf4j "1.6.6"] ;;avoids dep loop |
| nfs_volumes: | |
| home: "%{gdnet_env}-netapp1:/vol/home/qtree0" | |
| yum_cache: "%{gdnet_env}-netapp1:/vol/yum_cache/qtree0" | |
| techops: "%{gdnet_env}-netapp1:/vol/techops/qtree0" | |
| websites: "%{gdnet_env}-netapp1:/vol/websites_%{gdnet_env}/qtree0" | |
| apache_logs: "%{gdnet_env}-netapp1:/vol/apache_logs_%{gdnet_env}/qtree0" | |
| evolution_logs: "%{gdnet_env}-netapp1:/vol/evolution_logs_%{gdnet_env}/qtree0" |