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 CTRL_CHAN, DOOR_STATES, HOME_CHAN, LIFTMASTER_PASSWORD, LIFTMASTER_USERNAME, | |
MyQ, PUB_KEY, PubNub, SUB_KEY, garage, initPubNub, makeHandler, pubnubConns, | |
refreshStatus, _; | |
_ = require('underscore'); | |
MyQ = require('liftmaster'); | |
PubNub = require('pubnub'); | |
LIFTMASTER_USERNAME = 'YOUR_LIFTMASTER_USERNAME'; | |
LIFTMASTER_PASSWORD = 'YOUR_LIFTMASTER_PASSWORD'; |
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
const xhr = require('xhr'); | |
const qs = require('codec/query_string'); | |
export default (request) => { | |
const apiUrl = 'https://gateway-a.watsonplatform.net/calls/text/TextGetTextSentiment'; | |
const apiKey = '0000000000000000000000000000000000000000'; | |
const querystring = qs.stringify({ | |
outputMode: 'json', | |
showSourceText: 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
const console = require('console'); | |
const xhr = require('xhr'); | |
const store = require('kvstore'); | |
const query = require('codec/query_string'); | |
const auth = require('codec/auth'); | |
export default (request) => { | |
// watson api token | |
const username = '00000000-0000-0000-0000-000000000000'; | |
const password = '000000000000'; |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Google Maps Example</title> | |
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.4.1.min.js"></script> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" /> | |
</head> | |
<body> | |
<div class="container"> |
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
let xhr = require('xhr'); | |
let query = require('codec/query_string'); | |
export default request => { | |
let mapbox_clientToken = '000000000000000000000000000000000000000000000000000000000000000000000000'; | |
let mapbox_geo_apiUrl = 'https://api.mapbox.com/geocoding/v5/mapbox.places/'; | |
let mapbox_maps_apiUrl = 'https://api.mapbox.com/styles/v1/mapbox/streets-v8/static'; | |
let searchParam = request.message.query; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Angular 2</title> | |
<script src="https://unpkg.com/core-js@2.4.1/client/shim.min.js"></script> | |
<script src="https://unpkg.com/zone.js@0.7.2/dist/zone.js"></script> | |
<script src="https://unpkg.com/reflect-metadata@0.1.9/Reflect.js"></script> | |
<script src="https://unpkg.com/rxjs@5.0.1/bundles/Rx.js"></script> | |
<script src="https://unpkg.com/@angular/core/bundles/core.umd.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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Angular 2</title> | |
<script src="https://unpkg.com/core-js@2.4.1/client/shim.min.js"></script> | |
<script src="https://unpkg.com/zone.js@0.7.2/dist/zone.js"></script> | |
<script src="https://unpkg.com/reflect-metadata@0.1.9/Reflect.js"></script> | |
<script src="https://unpkg.com/rxjs@5.0.1/bundles/Rx.js"></script> | |
<script src="https://unpkg.com/@angular/core/bundles/core.umd.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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Angular 2</title> | |
<script src="https://unpkg.com/core-js@2.4.1/client/shim.min.js"></script> | |
<script src="https://unpkg.com/zone.js@0.7.2/dist/zone.js"></script> | |
<script src="https://unpkg.com/reflect-metadata@0.1.9/Reflect.js"></script> | |
<script src="https://unpkg.com/rxjs@5.0.1/bundles/Rx.js"></script> | |
<script src="https://unpkg.com/@angular/core/bundles/core.umd.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
const INFOBIP_API_KEY = 'YOUR_API_KEY'; | |
const INFOBIP_API_URL = 'https://api.infobip.com/sms/1/text/single'; | |
const SUCCESSFUL_SMS_STATUS_GROUPS = [1, 3]; | |
const pubNub = require('pubnub'); | |
const xhr = require('xhr'); | |
function composeOptions(apiKey, body) { | |
return { | |
method: 'POST', |
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
const XHR = require('xhr'); | |
const db = require('kvstore'); | |
const basicAuth = require('codec/auth'); | |
function fetchAccessToken(authUri, clientId, clientSecret) { | |
const auth = basicAuth.basic(clientId, clientSecret); | |
const httpOptions = { | |
method: 'POST', | |
body: 'grant_type=client_credentials&scope=ALL', | |
headers: { |
NewerOlder