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 AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: "__id__", | |
secretAccessKey: "__secret__", | |
}); | |
var lexruntime = new AWS.LexRuntime({region: 'us-east-1'}); | |
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
- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { | |
// if we're paused don't do anything | |
if(self.currentState==STATE_PAUSED) { | |
// reset our frame counter | |
self.validFrameCounter=0; | |
return; | |
} |
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 five = require("johnny-five"); | |
var board = new five.Board(); | |
var pubnub = new PubNub({ | |
subscribeKey: "mySubscribeKey", | |
publishKey: "myPublishKey", | |
ssl: true | |
}) |
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
// Publish the value using PubNub | |
static void publishMsg (void) | |
{ | |
// Check values for I2C line error... | |
if (TWI_msg[0] > 99 || TWI_msg[1] > 99) { | |
TWI_fullMsg = 10000; | |
} | |
// Ignore very small values | |
else if (TWI_msg[0] == 0 && TWI_msg[1] < 50) { | |
TWI_fullMsg = 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
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <Pubnub.h> | |
#include "string.h" | |
#include "iotconnector.h" | |
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
char pubkey[] = "PUBLISH KEYS HERE";char subkey[] = "SUBSCRIBE KEYS HERE";char channel[] = "iotchannel";char uuid[] = "Arduino"; |
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
function handleMsg(msg) { | |
if (VISIBLE) { | |
addData(msg.pub, msg.subs); | |
} | |
} | |
pubnub = new PubNub({ | |
publishKey : 'demo', | |
subscribeKey : 'demo' | |
}) |
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
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.js'></script> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.4/mapbox.css' rel='stylesheet' /> |
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
#!/usr/bin/python | |
import time | |
import RPi.GPIO as GPIO | |
from pubnub.pnconfiguration import PNConfiguration | |
from pubnub.pubnub import PubNub |
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
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js'></script> | |
<script src='https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.js'></script> | |
<link href='https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.1.15-beta/nv.d3.min.css' rel='stylesheet'> |
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
class Brain: NSObject, PNDelegate { | |
let configuration = PNConfiguration(publishKey: "demo", subscribeKey: "demo") | |
var channel = PNChannel() | |
var serverStatus = UILabel() | |
init() { | |
super.init() | |
} | |
} |
NewerOlder