Skip to content

Instantly share code, notes, and snippets.

View slavcodev's full-sized avatar
🙃
Enjoy coding ❤️

Slava Medvedev slavcodev

🙃
Enjoy coding ❤️
View GitHub Profile
@slavcodev
slavcodev / es_custom_fields.sh
Created January 29, 2020 17:24 — forked from 2e3s/es_custom_fields.sh
Custom Fields By Elasticsearch
#!/bin/sh
echo "Create index: "
# 64-bit long (-2^63..2^63-1) and double values are used
# all fields can take arrays as well but it's not possible to mix the types
curl -XPOST localhost:9200/transaction_temp -d '{
"mappings" : {
"live" : {
"_source" : { "enabled" : true },
"dynamic" : false,
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@slavcodev
slavcodev / prom.py
Created October 19, 2023 23:53 — forked from cdump/prom.py
cleargrass prometheus
#!/usr/bin/python3
from time import sleep, time
import miio
from prometheus_client import start_http_server, Gauge
if __name__ == '__main__':
MONITOR_IP = '192.168.88.100'
MONITOR_TOKEN = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'