Skip to content

Instantly share code, notes, and snippets.

View lukas-vlcek's full-sized avatar

Lukáš Vlček lukas-vlcek

View GitHub Profile
@lukas-vlcek
lukas-vlcek / gist:dd126b41ac61d2c36908666ccf369e48
Created May 7, 2018 08:42
Prometheus metrics pulled from ES node
sh-4.2$ es_util --query=_prometheus/metrics
# HELP es_indices_percolate_count Count of percolates
# TYPE es_indices_percolate_count counter
es_indices_percolate_count{cluster="logging-es",node="logging-es-data-master-f5trnjwj",nodeId="q5KN3f6TQnGMlwAhH9wbjQ",} 0.0
# HELP es_transport_rx_bytes_count Bytes received
# TYPE es_transport_rx_bytes_count counter
es_transport_rx_bytes_count{cluster="logging-es",node="logging-es-data-master-f5trnjwj",nodeId="q5KN3f6TQnGMlwAhH9wbjQ",} 19695.0
# HELP es_script_compilations_count Number of scripts compilations
# TYPE es_script_compilations_count counter
es_script_compilations_count{cluster="logging-es",node="logging-es-data-master-f5trnjwj",nodeId="q5KN3f6TQnGMlwAhH9wbjQ",} 0.0
@lukas-vlcek
lukas-vlcek / gist:bd7f2a22bb6aba81cdf7349e864ce438
Created November 10, 2017 12:03
Clean and setup Python2 from scratch
Before logging is deployed into AWS, this is a way how to make sure there won't be any python(2) libray conflicts.
1) Make sure there is no Python2 on my machine at all
```
pip freeze | sudo xargs pip uninstall -y
sudo dnf remove -y python2-libs
sudo dnf list --installed | grep python2
sudo rm -rf /lib/python2
sudo dnf clean all
@lukas-vlcek
lukas-vlcek / gist:fa9b33ec54e6d4c7a38a74f97a4b9601
Last active October 3, 2016 13:26
Building ES v2.3.5 from sources fails
$ uname -a
Darwin Lukass-MacBook-Pro.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
@lukas-vlcek
lukas-vlcek / gist:56540a7e8206d122d55c
Created October 31, 2014 18:04
Search Template with Sections?
## This works:
curl -X GET 'localhost:9200/_search/template' -d '{
"template" : "{ \"size\": \"{{size}}\", \"query\":{\"match_all\":{}}}",
"params":{
"size":1,
"use_size": false
}
}'
@lukas-vlcek
lukas-vlcek / gist:c8cd42be64eaca454bcd
Created June 29, 2014 19:08
Trying to transpile (ng2) di.js to ES5
// Trying to follow
// https://github.com/angular/di.js#transpiling-es6
[lukas di.js]$ sudo npm install -g gulp
Password:
/usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp/bin/gulp.js
gulp@3.8.5 /usr/local/lib/node_modules/gulp
├── tildify@0.2.0
├── interpret@0.3.4
├── pretty-hrtime@0.2.1
@lukas-vlcek
lukas-vlcek / gist:9641455
Last active August 29, 2015 13:57 — forked from pmuir/gist:9639232
{
"sys_title":"Have Your Cake and Eat It Too : Forge Tools",
# "sys_content_id":"23585936", # taken from URL
# "sys_content":null, # omit if empty
"sys_description":"We are currently working on the integration of Forge in JBoss Tools.",
"sys_url_view":"http://http://localhost:4242/video/vimeo/23585936",
# "sys_content_type":"video/vimeo", # taken from URL, in this case 'jbossdeveloper_video'
"sys_type":"jbossdeveloper_video",
# "sys_content_provider":"jboss-developer", # derived from credentials (http basic auth)
"author":{"display_name":"Koen Aers","id":"6802538","role":"","username":"user6802538"},
@lukas-vlcek
lukas-vlcek / gist:6972064
Last active December 25, 2015 11:49
Testing search time analyzer. This works as well now.
#!/bin/sh
echo "Elasticsearch version and build:"
curl localhost:9200; echo; echo;
echo "Delete index"
curl -X DELETE 'localhost:9200/i'; echo; echo;
echo "Create index with analysis and mappings"
curl -X PUT 'localhost:9200/i' -d '{
@lukas-vlcek
lukas-vlcek / gist:6972058
Created October 14, 2013 07:25
Testing search time analyzer. This works.
#!/bin/sh
echo "Elasticsearch version and build:"
curl localhost:9200; echo; echo;
echo "Delete index"
curl -X DELETE 'localhost:9200/i'; echo; echo;
echo "Create index with analysis and mappings"
curl -X PUT 'localhost:9200/i' -d '{
@lukas-vlcek
lukas-vlcek / gist:6923179
Created October 10, 2013 18:31
Elasticsearch: having multiple tokens at the same position is a problem?
#!/bin/sh
echo "Elasticsearch version"
curl localhost:9200; echo; echo;
echo "Delete index"; curl -X DELETE 'localhost:9200/i'; echo; echo;
echo "Create index with analysis and mappings"; curl -X PUT 'localhost:9200/i' -d '{
"settings" : {
"analysis" : {
@lukas-vlcek
lukas-vlcek / morava.dic
Last active December 21, 2015 17:39
Experimental czech hunspell dictionary extension (UTF-8)
9
čupnout/JTN
čupnutí/SN
čupnutý/YRN
čupět/AN
čupění/SN
čupící/YN
zavazející/YN
zavazet/AJTN
zavazení/SN