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
/* | |
This is useful for debugging systems that use low/high durations for communicating digital information. | |
I wrote this specific one for figuring out a wireless temperature/humidity gauge, thus to the 352+1 | |
*/ | |
#include <iostream> | |
#include <time.h> | |
#include <string.h> |
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
// This uses those super cheap 433mhz modules to receive a 32 bit integer | |
// You should be able to implement many 315 & 433mhz protocols in this, though more complex lock logic may be required | |
#include <wiringPi.h> | |
#include <time.h> | |
#include <iostream> | |
#include <bitset> | |
using namespace std; |
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
var sparkline = function(input) { | |
var numbers = input.split(/[\s,]+/); | |
var bar = [0,1,2,3,4,5,6].map(function (n) { return String.fromCharCode(9601+n);}); | |
var min = Math.min.apply(Math, numbers); | |
var max = Math.max.apply(Math, numbers); | |
var div = (max - min) / (bar.length - 1) | |
if (min === max) return Array(numbers.length).join(_.last(bar)) | |
return numbers.map(function (p) {return bar[Math.round(((p - min) / div))]}).join(''); | |
} |
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
link "#{node['kibana']['installdir']}/current/app/dashboards/default.json" do | |
to "logstash.json" | |
only_if { !File::symlink?("#{node['kibana']['installdir']}/current/app/dashboards/default.json") } | |
end |
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
{ | |
"rows": [ | |
{ | |
"title": "Query", | |
"height": "40px", | |
"editable": true, | |
"collapse": false, | |
"collapsable": true, | |
"panels": [ | |
{ |
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
{ | |
"rows": [ | |
{ | |
"title": "Query", | |
"height": "40px", | |
"editable": true, | |
"collapse": false, | |
"collapsable": true, | |
"panels": [ | |
{ |
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
# This command returns a terms facet of size 12 | |
# eg, every term in the terms index. Ordered by count they are: | |
# term12 (120) term11 (110) term10 (100) term9 (90) term8 (80) term7 (70) | |
# term6 (60) term5 (50) term4 (40) term3 (30) term2 (20) term1 (10) | |
curl -XGET 'http://localhost:9200/terms/_search?pretty' -d '{ | |
"facets": { | |
"terms": { | |
"terms": { | |
"field": "term", |
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
{ | |
"title": "American Gun Deaths since Newtown, CT", | |
"rows": [ | |
{ | |
"title": "Options", | |
"height": "50px", | |
"editable": true, | |
"collapse": false, | |
"collapsable": true, | |
"panels": [ |
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
{ | |
"title": "PHP Developer", | |
"rows": [ | |
{ | |
"title": "Options", | |
"height": "50px", | |
"editable": true, | |
"collapse": false, | |
"collapsable": true, | |
"panels": [ |
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 kibana.myhost.org; | |
access_log /var/log/nginx/kibana.myhost.org.access.log; | |
location ~ ^/_aliases$ { | |
proxy_pass http://127.0.0.1:9200; | |
proxy_read_timeout 90; | |
} | |
location ~ ^/.*/_search$ { |