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:
(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 |
I hereby claim:
To claim this, I am signing this object:
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" |
(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] |
(setq ruby-deep-indent-paren nil) | |
(defadvice ruby-indent-line (after unindent-closing-paren activate) | |
(let ((column (current-column)) | |
indent offset) | |
(save-excursion | |
(back-to-indentation) | |
(let ((state (syntax-ppss))) | |
(setq offset (- column (current-column))) | |
(when (and (eq (char-after) ?\)) | |
(not (zerop (car state)))) |
%li.reference_group | |
.container-fluid | |
.row-fluid | |
.span1.move | |
%i.icon-move | |
.span4 | |
= f.input_field :label_markdown, placeholder: '<markdown enabled>' | |
= f.input :order, as: :hidden | |
.span7 | |
= f.link_to_remove class: 'btn btn-danger' do |
# wraps third..+ paragraphs in div.more_content | |
# first two paragraphs are left in tack | |
def read_more_content html | |
first, second, *rest = Nokogiri::HTML::fragment(html).children | |
out = first.to_s + second.to_s | |
if rest.present? | |
out << "\n\n<div class=\"more_content\">" | |
out << rest.map(&:to_s).reduce(:+) | |
out << "</div>" | |
end |
# renders markdown with footnotes matching Pandoc's syntax, | |
# but renders html with custom formatting in the class methods link_to_text_replace, link_to_fn_replace | |
class CatalogEntry | |
LINK_TO_FN = "[^%d] " | |
LINK_TO_TEXT = "[^%d]: %s" | |
CITATION = "%{last}, %{first}%{other}. \"%{title}.\" In _Bits & Pieces Put Together to Present a Semblance of a Whole: Walker Art Center Collections_, edited by Joan Rothfuss and Elizabeth Carpenter. Minneapolis, MN: Walker Art Center, 2005." | |
FILE_TEMPLATE = "B&Pcat-%{last},%{first}_2005" | |
FILE_NAME_REGEX = /B&Pcat-(.+),(.+)_2005.*/ |
# store the job before it has a chance to be served by dragonfly | |
images.configure do |c| | |
c.define_url do |app, job, opts| | |
thumb = ThumbTracker.where(job: job.serialize).first | |
unless thumb | |
uid = job.store | |
thumb = ThumbTracker.create!( | |
:uid => uid, | |
:job => job.serialize | |
) |