Skip to content

Instantly share code, notes, and snippets.

View rashidkpc's full-sized avatar
🚲

Rashid Khan rashidkpc

🚲
View GitHub Profile
@rashidkpc
rashidkpc / meetup-20180510.json
Created May 10, 2018 15:41
Canvas workpad from May 2018 meetup
{
"name": "Meetup 20180502 - randomized",
"id": "workpad-f9b063e6-6849-48a8-9527-deadbeecafe",
"width": 1280,
"height": 720,
"page": 10,
"pages": [
{
"id": "page-0861786b-60ce-4130-aeb6-e474e18bb1d0",
"style": {
@rashidkpc
rashidkpc / gist:ccb1c95e63589fbb88c41680dd46f1ac
Created May 5, 2016 16:03
Saving a template visualization from another app in Kibana
function saveExpression(expression) {
savedVisualizations.get({type: 'timelion'}).then(function (savedExpression) {
savedExpression.id = expression;
savedExpression.visState.params = {
expression: expression,
interval: $scope.state.interval
};
savedExpression.title = expression;
savedExpression.visState.title = expression;
savedExpression.save().then(function (id) {
{
"type": "Program",
"body": [
{
"type": "IfStatement",
"test": {
"type": "Identifier",
"name": "blah"
},
"consequent": {
@rashidkpc
rashidkpc / foo.js
Last active February 10, 2016 23:05
alert('Herro Wold');
import _ from 'lodash';
import FieldFormatProvider from 'ui/index_patterns/_field_format/FieldFormat';
import fieldFormatsRegistry from 'ui/registry/field_formats';
import KibanaPlugin from 'somewhere/in/there'
module.exports = new KibanaPlugin('myPluginName', {
type: 'fieldFormat',
init: function () {
fieldFormatsRegistry.register(function UrlFormatProvider(Private) {
const FieldFormat = Private(FieldFormatProvider);
user:Rashid Khan
1323712592
:000000 100644 0000000... ce7a0c4... A README
:000000 100644 0000000... 2c954fd... A config.php
:000000 100644 0000000... 5b5dab2... A css/images/ui-bg_flat_0_aaaaaa_40x100.png
:000000 100644 0000000... 988f2ea... A css/images/ui-bg_flat_75_4b5657_40x100.png
:000000 100644 0000000... ac8b229... A css/images/ui-bg_flat_75_ffffff_40x100.png
:000000 100644 0000000... 4ff6e97... A css/images/ui-bg_flat_95_a92c10_40x100.png
:000000 100644 0000000... ad3d634... A css/images/ui-bg_glass_55_fbf9ee_1x400.png
:000000 100644 0000000... 42ccba2... A css/images/ui-bg_glass_65_ffffff_1x400.png
http://localhost:5601/app/kibana#/dashboard?_g=(filters:!((meta:(disabled:!f,index:INDEX_PATTERN_HERE,key:auth,negate:!f,value:VALUE_HERE),query:(match:(FIELD_HERE:(query:VALUE_HERE,type:phrase))))),refreshInterval:(display:Off,pause:!f,section:0,value:0),time:(from:now-7d,mode:quick,to:now))
{
"took": 14,
"timed_out": false,
"_shards": {
"total": 35,
"successful": 35,
"failed": 0
},
"hits": {
"total": 14268,
@rashidkpc
rashidkpc / Sensor_samples.txt
Last active August 29, 2015 14:17
TX7NU decoded
== Pulse duration samples ==
6780
1329 1086 1314 1067 1329 1071 1329 1068 577 1046 1330 1068 547 1076 1320 1006 1336 1066 1322 1116 1282 1071
1326 1009 547 1067 1323 1072 1336 1077 545 1001 541 1074 1323 1073 544 1076 544 1017 1325 1071 541 1078
540 1077 542 1009 1332 1072 566 1054 543 1073 1322 1009 1328 1073 539 1078 1327 1070 540 1017 1322 1076
537 1086 534 1079 541 1020 1316 1084 537 1072 542 1077 1321 1012 540 1098 532 1073 1316 1079 539
31787
@rashidkpc
rashidkpc / tx7nu.cpp
Last active August 29, 2015 14:17
La Crosse TX7NU decoder
/*
This takes in bits over 433mhz from a La Crosse TX7NU temp sensor and prints on the humidity and temp.
It does not currently validate the parity bit, nor the repetition of the ten and one parts of the BCD data, nor the checksum
*/
#include <wiringPi.h>
#include <time.h>
#include <iostream>
#include <bitset>