Skip to content

Instantly share code, notes, and snippets.

@sunnygleason
sunnygleason / pubnub_librato_ui.html
Last active March 10, 2017 19:49
PubNub Metrics UI w/ Librato API
<!doctype html>
<html>
<head>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.5.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="https://cdn.pubnub.com/sdk/pubnub-angular/pubnub-angular-4.0.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
</head>
@sunnygleason
sunnygleason / pubnub_sendgrid_ui.html
Last active March 10, 2017 19:49
PubNub Email Integration w/ SendGrid UI
<!doctype html>
<html>
<head>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.5.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="https://cdn.pubnub.com/sdk/pubnub-angular/pubnub-angular-4.0.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
</head>
@sunnygleason
sunnygleason / pubnub_sendgrid_block.js
Created December 14, 2016 21:45
PubNub Email Integration w/ Sendgrid BLOCK
function process(request) {
var console = require('console');
var xhr = require('xhr');
var query = require('codec/query_string');
var apiUrl = 'https://api.sendgrid.com/api/mail.send.json';
var apiUser = 'your_username';
var apiKey = 'your_pass';
var senderAddress = '[email protected]';
@sunnygleason
sunnygleason / pubnub_lexalytics_block.js
Created December 7, 2016 14:29
PubNub Sentiment Analysis BLOCK w/ Lexalytics Semantria
/*
Copyright (c) 2016 Lexalytics
Support: [email protected]
*/
export default (request) => {
// **************************
// PubNub Includes
// **************************
@sunnygleason
sunnygleason / pubnub_lexalytics_ui.html
Last active March 10, 2017 19:50
PubNub Sentiment Analysis UI w/ Lexalytics Semantria API
<!doctype html>
<html>
<head>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.5.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="https://cdn.pubnub.com/sdk/pubnub-angular/pubnub-angular-4.0.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
</head>
@sunnygleason
sunnygleason / pubnub_sdl_block.js
Created December 5, 2016 18:00
PubNub Translation BLOCK with SDL Language Cloud
export default request => {
let xhr = require('xhr');
let clientToken = '00000000000000000000000000000000';
let apiUrl = 'https://lc-api.sdl.com/translate';
const text = request.message.text;
const from = request.message.from;
const to = request.message.to;
if (!text || !from || !to) {
@sunnygleason
sunnygleason / pubnub_sdl_ui.html
Last active March 10, 2017 19:35
PubNub Translation UI with SDL Language Cloud
<!doctype html>
<html>
<head>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.5.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="https://cdn.pubnub.com/sdk/pubnub-angular/pubnub-angular-4.0.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
</head>
@sunnygleason
sunnygleason / pubnub_clarifai_ui.html
Last active March 10, 2017 19:34
PubNub Clarifai Image Analysis UI
<!doctype html>
<html>
<head>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.5.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="https://cdn.pubnub.com/sdk/pubnub-angular/pubnub-angular-4.0.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
</head>
@sunnygleason
sunnygleason / pubnub_clarifai_block.js
Last active November 22, 2016 05:43
PubNub Clarifai Image Analysis BLOCK
const xhr = require('xhr');
const query = require('codec/query_string');
const store = require('kvstore');
export default (request) => {
const clientId = 'YOUR_ID';
const clientSecret = 'YOUR_SECRET';
const apiUrl = 'https://api.clarifai.com/v1/tag';
const tokenUrl = 'https://api.clarifai.com/v1/token';
@sunnygleason
sunnygleason / pubnub_mapbox.html
Last active March 10, 2017 19:32
PubNub Geocoding and Mapping w/ MapBox UI
<!doctype html>
<html>
<head>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.5.0.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<script src="https://cdn.pubnub.com/sdk/pubnub-angular/pubnub-angular-4.0.2.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
</head>