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
| function pub() { | |
| console.log("publishing") | |
| pubnub.publish({ | |
| channel: "wnPutTime", | |
| message: { | |
| 'uuid': uuid | |
| }, | |
| callback: function(m) { | |
| console.log(m) | |
| } |
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 src="http://cdn.pubnub.com/pubnub-[version number].js"></script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import RPi.GPIO as GPIO | |
| import sys | |
| GPIO.setmode(GPIO.BCM) | |
| PIN_LIVING = 4 | |
| GPIO.setup(PIN_LIVING, GPIO.OUT) |
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
| import sys | |
| from pubnub import Pubnub | |
| pubnub = Pubnub(publish_key='<your-pub-key>', subscribe_key='<your-sub-key>') | |
| channel = 'hello-pi' | |
| data = { | |
| 'username': 'Your name', | |
| 'message': 'Hello World from Pi!' |
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(); | |
| board.on('ready', function() { | |
| led = new five.Led(5); // create a Led on pin 5 | |
| led.strobe(1000); // strobe for 1000ms | |
| this.repl.inject({ | |
| led: led | |
| }); | |
| }); |
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
| This is a gist for my blog/tutorial, "Creating a Chat App with Material Design using Polymer" |
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
| <!-- Include the PubNub Library (use the beta version)--> | |
| <script src="js/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
| var home = pubnub.sync('home'); |
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="js/PushNotification.js"></script> | |
| <script type="text/javascript" src="//cdn.pubnub.com/pubnub-3.7.4.min.js"></script> |