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
Pull down the george/add_test_infrastructure branch and checkit out. | |
Then setup BASE_DIR to point to the superdirectory of blueflood-chef, and copy the jar files staging there: | |
export BASE_DIR=/Users/georgej/incoming | |
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann-acknowledge.jar $BASE_DIR | |
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann-extra.jar $BASE_DIR | |
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann-starter-0.1.0-SNAPSHOT.jar $BASE_DIR | |
scp monitor00.iad.stage.bf.k1k.me:/opt/riemann/lib/riemann.jar $BASE_DIR |
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
(deftest flap-event-generation | |
(is (= (:flap-event | |
(inject! (map #(merge {:service "a" :host "a"} %) | |
[{:state "ok", :time 1} | |
{:state "ok", :time 10} | |
{:state "critical", :time 20} | |
{:state "ok", :time 30} | |
{:state "ok", :time 40} | |
{:state "critical", :time 140} | |
{:state "ok", :time 240} |
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
if I have: | |
(defn g1 [e] | |
(prn "foo" e)) | |
in my config, start rieman, change it to | |
(defn g1 [e] | |
(prn "bar" e)), | |
and reload, will (g1) subsequently print "bar"? |
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
I'm saying that this will work: | |
(let [index x service-threshold y] (load-stream threshold-stream)) | |
but this won't: | |
(let [index x service-threshold2 y] (load-stream threshold-stream)) | |
because the name is wrong in the let |
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
# Usage: | |
# heat -v stack-create $YOUR_STACK_NAME \ | |
# --template-file /path/to/grafana.template \ | |
# -P rax_tenant=$RAX_TENANT_ID \ | |
# -P rax_username=$RAX_USER_NAME \ | |
# -P rax_apikey=$RAX_API_KEY | |
# -P host_name=$WHAT_YOU_WANT_TO_CALL_IT | |
# | |
# What to expect: |
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
# Usage: | |
# heat -v stack-create $YOUR_STACK_NAME \ | |
# --template-file /path/to/grafana.template \ | |
# -P rax_tenant=$RAX_TENANT_ID \ | |
# -P rax_username=$RAX_USER_NAME \ | |
# -P rax_apikey=$RAX_API_KEY | |
# -P host_name=$WHAT_YOU_WANT_TO_CALL_IT | |
# | |
# What to expect: |
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
(defun gbj-backup-shell (&optional arg) | |
"makes a copy of the current shell with timestamp appended to the filename" | |
(interactive) | |
(let* | |
( | |
(save-dir "~/build/shells/") | |
(orig-file arg) | |
(mod-str nil) | |
) | |
(if (not orig-file) |
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
(lexical-let | |
((curbuf 0) | |
(buflist '("shell1" | |
"shell2" | |
"shell3" | |
"shell4" | |
"shell5" | |
"shell7" | |
"shell8" | |
"shell9" |
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
First create a server with a socket repl using | |
clojure.contrib.server-socket: | |
(defn start-server[host port] | |
(create-repl-server port) | |
(repl)) | |
Then create a bunch of netbots and have each use a repl to communicate | |
with the server repl. Have that repl request a new job from |
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 gjahad.socket-repl | |
(:use clojure.main) | |
(:use clojure.contrib.server-socket) | |
(:import java.net.Socket) | |
(:import java.net.InetAddress) | |
(:import clojure.lang.LineNumberingPushbackReader) | |
(:import java.io.InputStreamReader) | |
(:import java.io.OutputStreamWriter)) | |
(def *port* 4455) |
OlderNewer