This file contains hidden or 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
| carbon-relaj.core=> (>!! spool-channel ["a.b.c.d" (System/currentTimeMillis) (System/currentTimeMillis) ]) | |
| nil | |
| Not nil: [a.b.c.d 1387219958954 1387219958954] | |
| ["a.b.c.d",1387219958954,1387219958954] | |
| file-ref-map has ([:writable-file #<BufferedWriter java.io.BufferedWriter@1c62f6a>] [:file-name "/tmp/foo/temp/1387219958.962"] [:the-time 1387219958962]) | |
| writable-file is java.io.BufferedWriter@1c62f6a | |
| Exception in thread "Thread-1" java.lang.IllegalArgumentException: No matching method found: write for class java.io.BufferedWriter | |
| at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:53) | |
| at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28) | |
| at carbon_relaj.core$write_data_to_file.invoke(core.clj:199) |
This file contains hidden or 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
| carbon-relaj.files=> (fs/link "/tmp/foo/temp/20-1387779747.793" "/tmp/foo/send/host-a/foo") | |
| NoSuchFileException /tmp/foo/temp/20-1387779747.793 -> /tmp/foo/send/host-a/foo sun.nio.fs.UnixException.translateToIOException (UnixException.java:86) | |
| ; And in the opposite order: | |
| carbon-relaj.files=> (fs/link "/tmp/foo/send/host-a/foo/20-1387779747.793" "/tmp/foo/temp/20-1387779747.793") | |
| NoSuchFileException /tmp/foo/send/host-a/foo/20-1387779747.793 -> /tmp/foo/temp/20-1387779747.793 sun.nio.fs.UnixException.translateToIOException (UnixException.java:86) |
This file contains hidden or 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
| git clone https://github.com/apache/cassandra.git | |
| cd cassandra | |
| git checkout cassandra-1.2.13 | |
| ant |
This file contains hidden or 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
| include_recipe 'nagios::client' | |
| include_recipe 'nagios_discovery::virtualenv' | |
| # FIXME we need to move this block to ohai or cb attributes | |
| node.chef_environment =~ /(.*)-(.*)/ | |
| billing_env = $1 | |
| kcs_env = $2 | |
| azone = node['ec2']['placement_availability_zone'] | |
| region = azone[0, azone.length - 1] |
This file contains hidden or 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
| for f in $(find . -type f) ; do mv $f $(echo $f | sed 's/-\([0-9]*\)-/-300\1-/') ; done |
This file contains hidden or 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
| ``` | |
| $ kcs s create Cassandra CassandraPriamCluster.template PN ACount=2 DCount=2 ECount=2 InstanceCount=1 | |
| ``` | |
| The resulting cluster looks something like this: | |
| ``` | |
| (python)7235 pn@pn-mbp 11:44 ~/dvcs/github/chef-repo/environments $ hss s pn-cassandra -terminated | |
| 0. running 2014-01-31T16:27 i-b281df92 ec2-184-72-147-62.compute-1.amazonaws.com Kerberos cassandra_pn_kcs,base,pn_kcs,pn-cassandra,pn-cassandra | |
| 1. running 2014-01-31T16:27 i-b181df91 ec2-54-226-107-205.compute-1.amazonaws.com Kerberos cassandra_pn_kcs,base,pn_kcs,pn-cassandra | |
| 2. running 2014-01-31T16:24 i-d0bd21f1 ec2-184-72-73-37.compute-1.amazonaws.com Kerberos cassandra_pn_kcs,base,pn_kcs,pn-cassandra,pn-cassandra |
This file contains hidden or 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
| #!/bin/sh | |
| # the kernel doesn't seem to automatically | |
| # discover arrays with the >v0.90 md superblock | |
| # format - if I understand this properly. | |
| # So, do this as a script from the initramfs | |
| mdadm --assemble --scan |
This file contains hidden or 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
| $ lein run -c /tmp/foo | |
| Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java... | |
| ^[[BUnable to find a $JAVA_HOME at "/usr", continuing with system-provided Java... | |
| Config-file is /tmp/foo | |
| Config-file is /tmp/foo | |
| nil | |
| Exception in thread "main" java.lang.NullPointerException, compiling:(core.clj:34:33) | |
| at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3463) | |
| at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3457) | |
| at clojure.lang.Compiler$DefExpr.eval(Compiler.java:408) |
This file contains hidden or 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
| (def file-config-map {"channel-queue-size" "128", | |
| "send-dir" "/tmp/foo/send", | |
| "spool-dir" "/tmp/foo", | |
| "file-rotation-period-ms" "1000", | |
| "temp-dir" "/tmp/foo/temp", | |
| "channel-timeout" "250", | |
| "lineproto-port" "2003", | |
| "target-list" "host-a,host-b,host-c,host-d"}) | |
| (defn parse-int [maybe-a-string] |
This file contains hidden or 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
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys emacs | |
| set -g history-limit 10000 | |
| setw -g mode-keys emacs | |
| setw -g mode-mouse off |