Skip to content

Instantly share code, notes, and snippets.

View bkrajendra's full-sized avatar
🎯
Focusing

Rajendra bkrajendra

🎯
Focusing
View GitHub Profile
@bkrajendra
bkrajendra / video_details.php
Created September 22, 2018 03:09 — forked from djekl/video_details.php
Get Video Details from YouTube or Vimeo
<?php
$urls = array();
$videos = array();
// vimeo test
$urls[] = 'http://vimeo.com/6271487';
$urls[] = 'http://vimeo.com/68546202';
// youtube test
@bkrajendra
bkrajendra / mysensor.h
Created January 25, 2017 11:26
Header file for ioCareRF Node
/*
* The MySensors Arduino library handles the wireless radio link and protocol
* between your home built sensors/actuators and HA controller of choice.
* The sensors forms a self healing radio network with optional repeaters. Each
* repeater and gateway builds a routing tables in RAM or EEPROM which keeps track of the
* network topology allowing messages to be routed to nodes.
*
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
* Copyright (C) 2013-2015 Sensnology AB
* Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
@bkrajendra
bkrajendra / The gate resistor: a bit of theory
Last active October 18, 2016 09:41
The gate resistor: a bit of theory
*The gate resistor: a bit of theory*
When cruyising the internet for Triac switches, you may have come across a large diversion
in the value of the gate resistor value. My choice usually is to take the lowest value that
will still protect the gate and the optocoupler. Reader Mali Lagunas did some research in
the theory behind the criteria to choose the value of the gate resistor.
Which i will copy below:
The resistor when placed in this circuit, will have two main effects:
a) It will limit/provide the current going into the gate of the triac (I_{GT})
#include <ArduinoJson.h>
int my_code[75];
void setup() {
delay(2000);
// put your setup code here, to run once:
Serial.begin(115200);
//Assign HttpServer return string to this json
char json[] = "{\"data\":[38000,1,69,340,169,20,20,20,20,20,64,20,20,20,20,20,20,20,20,20,20,20,64,20,64,20,20,20,64,20,64,20,64,20,64,20,64,20,20,20,64,20,20,20,20,20,20,20,20,20,20,20,20,20,64,20,20,20,64,20,64,20,64,20,64,20,64,20,64,20,1544,340,85,20,3663]}";
StaticJsonBuffer<1000> jsonBuffer; //make sure to change it and keep it max as per your json length
<html>
<!-- License: LGPL 2.1 or QZ INDUSTRIES SOURCE CODE LICENSE -->
<head><title>QZ Print Plugin</title>
<script type="text/javascript" src="js/3rdparty/deployJava.js"></script>
<script type="text/javascript" src="js/qz-websocket.js"></script>
<script type="text/javascript">
/**
* Re-use the new WebSockets deployment if available. If not, fallback on the Oracle deployment
@bkrajendra
bkrajendra / a.txt
Created March 7, 2015 18:04
onsenui ESP communication example
{"light":1,"light_status":"off","somedata":"Hello world!"}
@bkrajendra
bkrajendra / designer.html
Created December 9, 2014 06:35
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#google_map_directions {
left: 820px;
top: 260px;
position: absolute;