Skip to content

Instantly share code, notes, and snippets.

View stephenlb's full-sized avatar
😀
Coding with Rust

Stephen Blum stephenlb

😀
Coding with Rust
View GitHub Profile
@stephenlb
stephenlb / 1.js
Created November 15, 2017 21:06 — forked from domadev812/1.js
Creating Real-Time WebGL Visualizations
function handleMsg(msg) {
if (VISIBLE) {
addData(msg.pub, msg.subs);
}
}
pubnub = new PubNub({
publishKey : 'demo',
subscribeKey : 'demo'
})
@stephenlb
stephenlb / 1.html
Created November 15, 2017 21:06 — forked from domadev812/1.html
Displaying Live Location Points & Tracks with JavaScript & MapBox and PubNub
<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' />
@stephenlb
stephenlb / 01.py
Created November 15, 2017 21:06 — forked from domadev812/01.py
[Blog] DIY Hue Lightbulb with Android Control
#!/usr/bin/python
import time
import RPi.GPIO as GPIO
from pubnub.pnconfiguration import PNConfiguration
from pubnub.pubnub import PubNub
@stephenlb
stephenlb / 1.html
Created November 15, 2017 21:06 — forked from domadev812/1.html
Transportation Delay: Create Real-Time Visualization of Data Using NVD3 And PubNub
<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'>
@stephenlb
stephenlb / 1.swift
Created November 15, 2017 21:06 — forked from domadev812/1.swift
Smart iBeacons in the Swift Programming Language
class Brain: NSObject, PNDelegate {
let configuration = PNConfiguration(publishKey: "demo", subscribeKey: "demo")
var channel = PNChannel()
var serverStatus = UILabel()
init() {
super.init()
}
}
@stephenlb
stephenlb / 1.js
Created November 15, 2017 21:06 — forked from domadev812/1.js
Shyam Mongo DB Blog
var pubnub = new PubNub({
publishKey : 'demo',
subscribeKey : 'demo'
})
@stephenlb
stephenlb / 1.html
Created November 15, 2017 21:06 — forked from domadev812/1.html
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.17.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>
@stephenlb
stephenlb / 1.bash
Created November 15, 2017 21:06 — forked from domadev812/1.bash
Publishing iOS Location Data w/ Swift and Google Maps API
$ pod init
$ {your favorite editor} Podfile
@stephenlb
stephenlb / 1.html
Created November 15, 2017 21:06 — forked from domadev812/1.html
Realtime Location Tracking on a Map using JavaScript
<script type="text/javascript" src="http://pubnub.github.io/eon/lib/eon-map.js"></script>
<link type="text/css" rel="stylesheet" href="http://pubnub.github.io/eon/lib/eon.css" />
<div id='map'></div>
<script type="text/javascript">
var pubnub = new PubNub({
publishKey: 'demo',
subscribeKey: 'demo'
});
eon.map({
pubnub: pubnub,
@stephenlb
stephenlb / 1.bash
Created November 15, 2017 21:06 — forked from domadev812/1.bash
Publishing Android Location on a Live-Updating Map (MapBox)
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub-gson</artifactId>
<version>4.14.0</version>
</dependency>