Skip to content

Instantly share code, notes, and snippets.

View stephenlb's full-sized avatar
😁
Coding Python, Rust, JavaScript, AI

Stephen Blum stephenlb

😁
Coding Python, Rust, JavaScript, AI
View GitHub Profile
<!--
WAIT! - This file depends on the PUBNUB API.
Visit www.pubnub.com to get your API Key and integration.
To add on your website, go here:
http://www.pubnub.com/app-showcase/traffic-beat
View source code by visiting:
http://github.com/pubnub/PubNub-Traffic-Beat
@stephenlb
stephenlb / 1.py
Last active October 19, 2017 00:36 — forked from ToeJamson/1.c
topic = "user/path/topic"
@stephenlb
stephenlb / subscribe.cs
Last active August 29, 2015 14:06
The Subscribe<string>() method is being used to receive poll answers in realtime via an automatically negotiated protocol like WebSockets, HTTP Streaming, HTTP Long-polling, TCP Streaming and more with automatic recovery of dropped messages. We've made it easy for you to get started by providing this easy-to-use SDK.
// Subscribe To Vote Submissions
pubnub.Subscribe<string>(
pubnubChannel,
DisplayReturnMessage,
DisplaySubscribeConnectStatusMessage,
DisplayErrorMessage
);
// Callback method Receive Votes in JSON string format
static void DisplayReturnMessage(string result)
@stephenlb
stephenlb / Procfile
Last active April 2, 2025 20:39
Twitter / PubNub Bridge - Heroku Worker
tweetstream: node twitter-pubnub-stream.js
function self:UUID()
return UUID()
end
## gem install pubnub
require 'pubnub'
pubnub = Pubnub.new(
:subscribe_key => 'sub-c-44d3418c-4855-11e4-8a5b-02ee2ddab7fe',
:publish_key => 'pub-c-eae49ba3-b1ee-46c4-8674-27ce042e7ab3'
)
## Get Latest Dashboard and Modify Revenue
pubnub.history( :channel => '', :count => 1 ) do |response|
@stephenlb
stephenlb / .bashrc
Last active August 29, 2015 14:07
Mac Terminal Backup Files
export PS1="\u:\w$ "
alias ..='cd ..'
alias ...='cd -'
alias l='ls -lsrtahG'
alias ls='ls -hG'
alias c='cd '
alias v='vim '
@stephenlb
stephenlb / sproggiwood-crash
Created November 2, 2014 17:32
Sproggiwood Crash 2014-11-02 (November 2nd)
Process: Sproggiwood [4006]
Path: /Users/USER/Library/Application Support/Steam/*/Sproggiwood.app/Contents/MacOS/Sproggiwood
Identifier: unity.Freehold Games.Sproggiwood
Version: Unity Player version 4.5.5f1 (4.5.5f1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Sproggiwood [4006]
User ID: 501
Date/Time: 2014-11-02 09:30:06.104 -0800
@stephenlb
stephenlb / Pubnub.py
Last active September 18, 2017 19:39
Python Echo Server - Example of Publish / Subscribe Python Echo Server without IP address binding.
## www.pubnub.com - PubNub Real-time push service in the cloud.
# coding=utf8
## PubNub Real-time Push APIs and Notifications Framework
## Copyright (c) 2014-15 Stephen Blum
## http://www.pubnub.com/
## -----------------------------------
## PubNub 3.5.3 Real-time Push Cloud API
## -----------------------------------
@stephenlb
stephenlb / README.md
Last active August 29, 2015 14:11
Secure PubNub Subscriber Key and Channel Name by Securing Data Streams on PubNub with ACL / Access Management

Securing Data Streams on PubNub with ACL / Access Management

You want to Secure the PubNub Subscriber Key and the Channel Name too. With fine grain read and write access control on a per-connection level you can Provide Authorization and access control to users, devices and channels.

Good Part - With PubNub Access Management and ACL you can prevent someone from setting up their own PubNub client and receive the notifications without any authorization.