This file contains 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://127.0.0.1:9200/_recovery?pretty&human' | |
{ | |
"bloonix-2016-01" : { | |
"shards" : [ { | |
"id" : 1, | |
"type" : "STORE", | |
"stage" : "DONE", | |
"primary" : true, | |
"start_time" : "2016-02-03T14:12:48.584Z", | |
"start_time_in_millis" : 1454508768584, |
This file contains 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://127.0.0.1:9200/_cluster/health?pretty=true' | |
{ | |
"cluster_name" : "elasticsearch", | |
"status" : "yellow", | |
"timed_out" : false, | |
"number_of_nodes" : 1, | |
"number_of_data_nodes" : 1, | |
"active_primary_shards" : 5, | |
"active_shards" : 5, | |
"relocating_shards" : 0, |
This file contains 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://127.0.0.1:9200//bloonix-2016-01' | |
{ | |
"bloonix-2016-01": { | |
"aliases": {}, | |
"mappings": { | |
"event": { | |
"properties": { | |
"attempts": { | |
"type": "string" | |
}, |
This file contains 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
POST /bloonix-2016-02/stats/?routing=10 HTTP/1.1 | |
Accept-Encoding: compress, gzip | |
Connection: close | |
Host: 127.0.0.1:9200 | |
User-Agent: HTTP-Tiny/0.039 | |
Content-Length: 93 | |
Content-Type: application/json; charset=UTF-8 | |
{"data":{"time":110.697},"time":"1454509382000","host_id":"10","service_id":93,"plugin_id":7}HTTP/1.1 400 Bad Request | |
Content-Type: application/json; charset=UTF-8 |
This file contains 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
server { | |
# listen 80; | |
server_name foobar.com www.foobar.com www.foobar.com.br; | |
location = / { | |
return 302 http://foobar.com.br?; | |
} | |
location / { | |
return 302 http://foobar.com.br$request_uri; |
This file contains 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
use strict; | |
use HTTP::Async; | |
use HTTP::Request; | |
use IO::Socket::SSL qw(debug4); | |
use URI; | |
my $async = HTTP::Async->new( ); |
This file contains 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
use strict; | |
my @tests = (qw/+5511951345146 +551138765980 +550CR1138765980 +550CR11951345146 +55CR1138765980/); | |
for my $telnum (@tests) { | |
my $info = &parsetelephone($telnum); | |
use DDP; | |
p [ $telnum, $info ]; |
This file contains 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
use strict; | |
use warnings; | |
use Mojo::Template; | |
use Text::Xslate; | |
use Template; | |
# some useful options (see below for full list) | |
my $config = { | |
EVAL_PERL => 0, # evaluate Perl code blocks | |
}; |
This file contains 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
<?php /*457563643*/ error_re... |
This file contains 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
with orig as ( | |
select 'original value'::text as foo limit 1 | |
), | |
orig_if_not as ( | |
select 'the value if first query returns no rows'::text as foo | |
) | |
select coalesce(a.foo, b.foo) as the_foo | |
from orig a | |
right join orig_if_not b on (a.foo is not null) |