This file contains hidden or 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
| $ pod init | |
| $ {your favorite editor} Podfile |
This file contains hidden or 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 type="text/javascript" src="//pubnub.github.io/eon/v/eon/1.0.0/eon.js"></script> | |
| <link type="text/css" rel="stylesheet" href="//pubnub.github.io/eon/v/eon/1.0.0/eon.css"/> | |
| <script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
| <script src="../vendor/d3.v3.js"></script> | |
| <script src="../rickshaw.min.js"></script> | |
| <script src="../src/js/Rickshaw.Fixtures.PubNub.js"></script> |
This file contains hidden or 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
| eon.chart({ | |
| channel: 'humeon', | |
| generate: { | |
| bindto: '#chart', | |
| data: { | |
| type: 'gauge', | |
| }, | |
| gauge: { | |
| min: 0, | |
| max: 100 |
This file contains hidden or 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
| from pubnub.pnconfiguration import PNConfiguration | |
| from pubnub.pubnub import PubNub | |
| import RPi.GPIO as GPIO | |
| import time | |
| import sys | |
| loopcount = 0 |
This file contains hidden or 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
| <?xml version='1.0' encoding='utf-8'?> | |
| <widget id="com.pubnub.com" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
| <name>SimpleChat</name> | |
| ... | |
| <platform name="ios"> | |
| <icon src="app-icon-ios.png" /> | |
| ... | |
| </platform> | |
This file contains hidden or 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
| private static PreviewCallback previewCallback = new PreviewCallback() { | |
| /** | |
| * {@inheritDoc} | |
| */ | |
| @Override | |
| public void onPreviewFrame(byte[] data, Camera cam) { | |
| if (data == null) throw new NullPointerException(); | |
| Camera.Size size = cam.getParameters().getPreviewSize(); | |
| if (size == null) throw new NullPointerException(); |
This file contains hidden or 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
| Enter Chat and press enter | |
| <div><input id=input placeholder=you-chat-here /></div> | |
| Chat Output | |
| <div id=box></div> | |
| <script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
| <script>(function(){ | |
| var pubnub = new PubNub({ |
This file contains hidden or 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 hidden or 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
| $ npm install -g cordova |
This file contains hidden or 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 | |
| }) |