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
;; This is a function that needs 'resource' started/stopped by the component | |
(defn index-create [name] | |
(let [conn (esr/connect (es-url) {:connection-manager __HOW_TO_PASS_COMPONENT_HERE__})] | |
(esi/create conn name) | |
)) | |
;; A component that takes care of starting and stopping and stopping http connection manager |
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
(ns configuration | |
(:require [logomotive.api.input :as input] | |
[logomotive.api.output :as output] | |
[logomotive.api.transform :as transform] | |
)) | |
; Read events from stdin, keep it as-is | |
(input/stdin {:format :plain}) | |
; Read events from UDP on port 1984, keep it as-is |
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
(ns core | |
(:require [cheshire.core :as j])) | |
(defn -main [& args] | |
(println "Hello, World!")) |
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
(ns ast) | |
(def ast-eval | |
(memoize | |
(fn | |
([expr] | |
(if (vector? expr) | |
(let [head-sym (first expr)] | |
(cond | |
(number? head-sym) head-sym |
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
(ns core | |
(:require | |
[clojurewerkz.elastisch.rest.document :as doc] | |
[clojurewerkz.elastisch.rest :as esr] | |
[clojurewerkz.elastisch.query :as q] | |
[clojurewerkz.elastisch.rest.response :as esrsp])) | |
(defn move-documents [conn <-index scroll-id] | |
(let [;; scroll query - step 2 | |
scan-response (doc/scroll conn scroll-id :scroll "1m") |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
.idea | |
.vagrant |
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
public DefaultHttpClient createHttpClient() throws Exception { | |
// Some constants | |
final int timeout = 10000; | |
final int HTTP_PORT = 80; | |
final int HTTPS_PORT = 443; | |
final String HTTPS = "https"; | |
final String HTTP = "http"; | |
String keystoreName = "keystore"; | |
String keystoreType = "JKS"; | |
String keystorePass = "secret"; |
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
{ | |
"cluster_name" : "elasticsearch-beta", | |
"nodes" : { | |
"y3q_T0UzQ2i_UyVmACqdSg" : { | |
"name" : "es-data-beta001.dom.example.com", | |
"transport_address" : "inet[/172.24.249.9:9300]", | |
"host" : "es-data-beta001", | |
"ip" : "172.24.249.9", | |
"version" : "1.5.2", | |
"build" : "62ff986", |
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
Interval 5 | |
Hostname 1.1.1.1 | |
LoadPlugin cpu | |
LoadPlugin network | |
<Plugin network> | |
<Server "localhost" "1984"> | |
</Server> | |
</Plugin> |