This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((buf (first | |
(remove* nil (buffer-list) | |
:test-not #'(lambda (a b) | |
(string-match "^\*cider-repl" (buffer-name b))))))) | |
(save-excursion | |
(set-buffer buf) | |
(goto-char (point-max)) | |
(insert "(start-figwheel \"ios\")") | |
(cider-repl-return))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn instrument-resolvers! | |
"Look for any fns matching the pattern resolve-.* in the ns*, instrument them with | |
iapetos for Prometheus monitoring." | |
[ns* registry] | |
(doseq [resolver-str (filter #(re-matches #"resolve-.*" (str %)) (keys (ns-publics (ns-name ns*))))] | |
(->> resolver-str symbol resolve (iapetos.collector.fn/instrument! registry)))) | |
(instrument-resolvers! *ns* registry) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cep-dedup | |
(:require [clj-time.coerce :as c] | |
[clojure.core.async :refer :all])) | |
; something like esper's std:firstunique. for a given time window ignore any duplicate messages received | |
; on channels after the first unique. subsequent messages on the first receiving channel pass through. | |
(defn update-sources [sources msgs min-time] | |
(clojure.core/reduce (fn [s msg] | |
(let [remaining (set (filter (fn [m] (not= (:ts m) min-time)) (get s (hash msg))))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns fressian-util | |
(:require [clojure.java.io :as io] | |
[clojure.data.fressian :as fress])) | |
(defn lazy-fressian-objects [file] | |
(letfn [(helper [rdr] | |
(lazy-seq | |
(if-let [is-avail (> (.available rdr) 0)] | |
(cons (fress/read-object (fress/create-reader rdr)) (helper rdr)) | |
(do (.close rdr) nil))))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<server xmlns='urn:jboss:domain:1.4'> | |
<extensions> | |
<extension module='org.jboss.as.clustering.infinispan'/> | |
<extension module='org.jboss.as.cmp'/> | |
<extension module='org.jboss.as.configadmin'/> | |
<extension module='org.jboss.as.connector'/> | |
<extension module='org.jboss.as.deployment-scanner'/> | |
<extension module='org.jboss.as.ee'/> | |
<extension module='org.jboss.as.ejb3'/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15:35:15,063 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1 | |
15:35:15,371 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA | |
15:35:15,445 INFO [org.jboss.as] (MSC service thread 1-2) JBAS015899: JBoss AS 7.1.x.incremental.129 "Arges" starting | |
15:35:15,455 DEBUG [org.jboss.as.config] (MSC service thread 1-2) Configured system properties: | |
[Standalone] = | |
awt.toolkit = sun.awt.X11.XToolkit | |
file.encoding = UTF-8 | |
file.encoding.pkg = sun.io | |
file.separator = / | |
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.pallet/config.clj: | |
(defpallet | |
:admin-user {:username "vagrant" | |
:private-key-path "/Users/robertb/.vagrant.d/insecure_private_key"} | |
:services | |
{ | |
:my-servers { | |
:provider "node-list" | |
:node-list [["vagrant" "utility" "localhost" :ubuntu :ssh-port 2222]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2013-06-18 12:28:34,791 DEBUG [operate-27] p.c.operations lift :phases [:pallet/os :settings] :targets [] | |
2013-06-18 12:28:34,798 DEBUG [operate-28] p.c.primitives build-and-execute-phase :pallet/os on 0 target(s) | |
2013-06-18 12:28:34,805 DEBUG [operate-28] p.c.primitives build-and-execute-phase :settings on 0 target(s) | |
2013-06-18 12:28:34,810 DEBUG [operate-27] p.c.operations lift-partitions :phases [:phase13801] :targets [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in ~/.pallet/config.clj: | |
(defpallet | |
:services | |
{ | |
:my-servers { | |
:provider "node-list" | |
:node-list [["hostname1.local" "staging" "hostname1.local" :ubuntu]] | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn rand-str [len] | |
(apply str (take len (repeatedly #(char (+ (rand 26) 65)))))) |
NewerOlder