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
;; Factorial Recursivo | |
;; http://stackoverflow.com/questions/1662336/clojure-simple-factorial-causes-stack-overflow | |
(defn !-recursive [x] | |
(if (= x 1) 1N | |
(* x (!-recursive (dec x))))) | |
;; Factorial Iterativo | |
;; https://mitpress.mit.edu/sicp/full-text/sicp/book/node15.html | |
(defn !-iterative | |
([x] (!-iterative 1N 1 x)) |
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
sudo sysctl -q -w vm.max_map_count=262144 | |
docker run -p 9200:9200 --security-opt seccomp=unconfined -i -t danielef/elasticsearch:5.0.0-alpha5 |
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
curl http://localhost:9200/_cat/indices?v |
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 i in $( docker ps -a | sed -n '1!p' | awk '{print$1}' ); do docker rm $i; 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
(-> (-> (Thread/currentThread) (.getContextClassLoader)) (.addURL (java.net.URL. "file:///path/to/jboss-cli-client.jar"))) |
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
curl -XGET 'http://localhost:9200/logstash-2016.09.28/_search?pretty=true' -d ' { | |
"query": { | |
"filtered": { | |
"filter": { | |
"bool": { | |
"must": [ | |
{"term": {"service.raw": "jmx.Memory.HeapMemoryUsage.used"}} | |
] | |
} | |
} |
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
## -*- shell-script -*- ###################################################### | |
## ## | |
## JBoss Bootstrap Script Configuration ## | |
## ## | |
############################################################################## | |
### $Id: run.conf 91533 2009-07-22 01:20:05Z gbadner $ | |
# | |
# This shell script is sourced by run.sh to initialize the environment |
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
guest readonly | |
admin readwrite |
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
curl -X POST http://localhost:9200/_reindex -d '{ | |
"source": { | |
"index": "twitter" | |
}, | |
"dest": { | |
"index": "new_twitter" | |
} | |
}' | |
curl -X DELETE http://localhost:9200/twitter |
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
;; Query time: 13 msec | |
;; SERVER: 8.8.8.8#53(8.8.8.8) | |
;; WHEN: Thu Oct 27 14:05:26 2016 | |
;; MSG SIZE rcvd: 53 | |
size inuse free pin virtual mmode | |
memory 4030464 3606573 423891 821507 2071729 Ded | |
pg space 4325376 28186 |