Skip to content

Instantly share code, notes, and snippets.

View ToeJamson's full-sized avatar

Joe Hanson ToeJamson

  • @observe.ai
  • San Francisco, CA
View GitHub Profile
@ToeJamson
ToeJamson / 1.css
Created October 1, 2013 20:39
Beautiful HTML5 Chat on Mobile and Web using PubNub Channel Presence
#main {
z-index: 50;
margin: 0;
border: 0;
padding: 0;
position: relative;
overflow: hidden;
width: 1024px;
@ToeJamson
ToeJamson / 1.js
Last active December 24, 2015 10:39
Building a PubNub-Powered Chat App with Sencha Touch 2
"js": [
{
"path": "resources/js/pubnub-3.1.min.js"
},
{
"path": "../sencha-sdk/sencha-touch.js"
},
{
"path": "app.js",
"update": "delta"
@ToeJamson
ToeJamson / 1.js
Created October 11, 2013 17:01
Node.js Quick Start
<div pub-key="demo" sub-key="demo" id="pubnub"></div>
<script src="http://cdn.pubnub.com/pubnub-3.1.min.js"></script>
<script>(function(){
// Listen For Events
PUBNUB.subscribe({
channel : "hello_world", // Channel
error : function() { // Lost Connection (auto reconnects)
alert("Connection Lost. Will auto-reconnect when Online.")
},
@ToeJamson
ToeJamson / 1.js
Created October 22, 2013 23:15
Secure Chat using PubNub Access Manager
pubnub.grant({
channel : 'chat',
auth_key : 'abxyz12-auth-key-987tuv',
read : true,
write : true,
ttl : 1
});
@ToeJamson
ToeJamson / 1
Last active December 27, 2015 09:39
PubNub & Rasberry Pi: Up and Running
git clone https://github.com/pubnub/c.git
@ToeJamson
ToeJamson / 1
Last active December 27, 2015 19:09
Tutorial: How To Build HTML5 Multiplayer Game Foundation
// RECEIVE MESSAGES
PUBNUB.subscribe({
channel : 'my-game-channel',
callback : function(message) {
// A message is received here and it contains
// the information from the original publish.
// With this hook, you update the Player UI.
// The message in this case contains information that
// a new purchase has been placed.
@ToeJamson
ToeJamson / 1.lua
Created November 11, 2013 18:41
Corona SDK Multiplayer Networking API for Mobile Games
require "pubnub"
--
-- GET YOUR PUBNUB KEYS HERE:
-- http://www.pubnub.com/account#api-keys
--
multiplayer = pubnub.new({
publish_key = "demo", -- YOUR PUBLISH KEY
subscribe_key = "demo", -- YOUR SUBSCRIBE KEY
secret_key = nil, -- YOUR SECRET KEY
@ToeJamson
ToeJamson / 1.js
Created November 19, 2013 22:52
Building Video Calling With PubNub and WebRTC
<script src=”http://cdn.pubnub.com/pubnub.min.js”></script>
<script src=”http://pubnub.github.io/webrtc/webrtc-beta-pubnub.js”></script>
@ToeJamson
ToeJamson / 1.js
Created December 18, 2013 01:04 — forked from anonymous/1.js
<script src="http://cdn.pubnub.com/pubnub.min.js"></script>
<script src="components/angular/angular.js"></script>
<script src="scripts/pubnub-angular.js"></script>
@ToeJamson
ToeJamson / 1.js
Last active October 19, 2017 01:29
Bitcoin Graph Real-Time
var pubnub = PUBNUB.init({
subscribe_key: 'sub-c-50d56e1e-2fd9-11e3-a041-02ee2ddab7fe'
});