Skip to content

Instantly share code, notes, and snippets.

View tpolekhin's full-sized avatar
🤓

Tymofii Polekhin tpolekhin

🤓
View GitHub Profile
[{"key":"us-south","latitude":32.7767,"longitude":-97.040443,"name":"Dallas"},{"key":"eu-central","latitude":50.110924,"longitude":8.682127,"name":"Frankfurt"},{"key":"ap-north","latitude":1.290270,"longitude":103.851959,"name":"Singapore"},{"key":"ap-south","latitude":-33.865143,"longitude":151.209900,"name":"Sydney"},{"key":"us-east","latitude":38.889931,"longitude":-77.009003,"name":"Washington DC"}]
@tpolekhin
tpolekhin / ibm-zone-location.json
Last active November 22, 2018 15:20
grafana world map panel location file
[{"key":"dal10","latitude":32.7767,"longitude":-97.040443,"name":"Dallas 10"},{"key":"dal12","latitude":32.7767,"longitude":-97.040443,"name":"Dallas 12"},{"key":"fra02","latitude":50.110924,"longitude":8.682127,"name":"Frankfurt 02"},{"key":"fra05","latitude":50.110924,"longitude":8.682127,"name":"Frankfurt 05"},{"key":"sng01","latitude":1.290270,"longitude":103.851959,"name":"Singapore 01"},{"key":"syd01","latitude":-33.865143,"longitude":151.209900,"name":"Sydney 01"},{"key":"wdc04","latitude":38.889931,"longitude":-77.009003,"name":"Washington DC 04"},{"key":"wdc06","latitude":38.889931,"longitude":-77.009003,"name":"Washington DC 06"}]
@tpolekhin
tpolekhin / elasticsearch.yml
Created May 16, 2016 09:28
ES configuration for sa-backup
index.auto_expand_replicas: false
path.home: /tmp/mesos/elasticsearch
path.data: /tmp/mesos/elasticsearch/data
path.logs: /tmp/mesos/elasticsearch/logs
path.work: /tmp/mesos/elasticsearch/work

Adding git submodules to repo

This sequence would get you set up:

cd <my-project-dir>
git submodule add <github repository> <my-third-party-dir>   # -b <branch> optionally
git submodule init
git submodule update

At this point you've got my-third-party-dir populated with a particular commit (a detached head). Your project will have two changes.

@tpolekhin
tpolekhin / sample.json
Created April 20, 2016 11:16
sample JSON data
{"id":1,"sample":1,"channel":1,"val":0.123456789}
{"id":2,"sample":1,"channel":2,"val":1.234567891}
{"id":3,"sample":1,"channel":3,"val":2.345678912}
{"id":4,"sample":2,"channel":1,"val":3.456789123}
{"id":5,"sample":2,"channel":2,"val":4.567891234}
{"id":6,"sample":2,"channel":3,"val":5.678912345}
{"id":7,"sample":3,"channel":1,"val":6.789123456}
{"id":8,"sample":3,"channel":2,"val":7.891234567}
{"id":9,"sample":3,"channel":3,"val":8.912345678}
index.auto_expand_replicas: false
path.home: /var/elasticsearch
path.data: /var/elasticsearch/data
path.logs: /var/elasticsearch/logs
path.work: /var/elasticsearch/work
/**
* Sample JavaScript code
*
* Available Objects:
*
* records: an array of records to process, depending on the JavaScript processor
* processing mode it may have 1 record or all the records in the batch.
*
* state: a dict that is preserved between invocations of this script.
* Useful for caching bits of data e.g. counters.