Consultar a saúde do servidor:
GET /_cat/health?v
Está yellow?
PUT /.kibana/_settings
{
"index": {
Consultar a saúde do servidor:
GET /_cat/health?v
Está yellow?
PUT /.kibana/_settings
{
"index": {
/** | |
* Converts a JS string to a UTF-8 "byte" array. | |
* @param {string} str 16-bit unicode string. | |
* @return {!Array<number>} UTF-8 byte array. | |
*/ | |
function stringToUtf8ByteArray(str) { | |
// TODO(user): Use native implementations if/when available | |
var out = [], p = 0; | |
for (var i = 0; i < str.length; i++) { | |
var c = str.charCodeAt(i); |
// Retorna um número inteiro rondômico entre min (incluso) e max (incluso) | |
function getRandomIntFromInterval(min, max) { | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} |
let clone = function(obj) { | |
let copy; | |
// Handle the 3 simple types, and null or undefined | |
if (null === obj || "object" !== typeof obj) return obj; | |
// Handle Date | |
if (obj instanceof Date) { | |
copy = new Date(); | |
copy.setTime(obj.getTime()); |
let distanceBetweenCoordinates = function(p1, p2){ | |
// distância em metros | |
return Math.sqrt(Math.pow(p1.latitude - p2.latitude, 2) + Math.pow(p1.longitude - p2.longitude, 2)) * 111.319 * 1000; | |
}; |
/* | |
Copyright 2017 Marcelito Costa | |
https://gist.github.com/marcelitocs/876edd2c70e47f16e595b4dd5f0b6c2d | |
Exemple of use | |
$(".table tbody tr").sortElements(function(a, b){ | |
if(a.data("vencimento") < b.data("vencimento")){ | |
return -1; | |
} | |
if(a.data("vencimento") > b.data("vencimento")){ |
wget https://storage.googleapis.com/golang/go1.8.linux-armv6l.tar.gz
tar -C /usr/local -xzf go1.8.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
function removerAcentos( newStringComAcento ) { | |
var string = newStringComAcento; | |
var mapaAcentosHex = { | |
a : /[\xE0-\xE6]/g, | |
A : /[\xC0-\xC6]/g, | |
e : /[\xE8-\xEB]/g, | |
E : /[\xC8-\xCB]/g, | |
i : /[\xEC-\xEF]/g, | |
I : /[\xCC-\xCF]/g, | |
o : /[\xF2-\xF6]/g, |