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://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script> | |
<script src="https://cdn.pubnub.com/webrtc/webrtc.js"></script> |
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
<?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 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
h,t = dht.read_retry(dht.DHT22, 4) | |
print 'Temp={0:0.1f}*C Humidity={1:0.1f}%'.format(t, h) |
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
import sys | |
from pubnub.callbacks import SubscribeCallback | |
from pubnub.pnconfiguration import PNConfiguration | |
from pubnub.pubnub import PubNub | |
pnconfig = PNConfiguration() | |
pnconfig.subscribe_key = "my_subkey" | |
pnconfig.publish_key = "my_pubkey" | |
pnconfig.ssl = False | |
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
private void setScanFilter() { | |
ScanFilter.Builder mBuilder = new ScanFilter.Builder(); | |
ByteBuffer mManufacturerData = ByteBuffer.allocate(23); | |
ByteBuffer mManufacturerDataMask = ByteBuffer.allocate(24); | |
byte[] uuid = getIdAsByte(UUID.fromString("0CF052C297CA407C84F8B62AAC4E9020"); | |
mManufacturerData.put(0, (byte)0xBE); | |
mManufacturerData.put(1, (byte)0xAC); | |
for (int i=2; i<=17; i++) { | |
mManufacturerData.put(i, uuid[i-2]); | |
} |
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 drivers = [ | |
{ latlng: [30.370375, -97.756138] }, | |
{ latlng: [30.323118, -97.739144] }, | |
{ latlng: [30.302816, -97.699490] }, | |
{ latlng: [30.293479, -97.742405] }, | |
{ latlng: [30.250337, -97.754593] }, | |
{ latlng: [30.236689, -97.762730] } | |
]; |
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 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 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 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 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 |