In addition to the Storybook for React setup, you'll also need to install these packages:
npm i -D @babel/core babel-loader css-loader style-loader
// Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob | |
var rhinoStorage = localStorage.getItem("rhino"), | |
rhino = document.getElementById("rhino"); | |
if (rhinoStorage) { | |
// Reuse existing Data URL from localStorage | |
rhino.setAttribute("src", rhinoStorage); | |
} | |
else { | |
// Create XHR and FileReader objects | |
var xhr = new XMLHttpRequest(), |
(function (Controller, _) { | |
"use strict"; | |
Controller.BasicController = function (parameters) { | |
var paramKeys = _.keys(parameters); | |
this.canDispatch = function (match) { | |
return _.every(paramKeys, function (c) { | |
return parameters[c] === match.getParam(c); | |
}); |
AWS = (function () { | |
var SDK = Npm.require("aws-sdk"); | |
var crypto = Npm.require("crypto"); | |
var url = Npm.require("url"); | |
function getAuthenticatedURL(fullUrl, accessKeyID, secretAccessKey, expires) { | |
/* | |
Signature = URL-Encode( Base64( HMAC-SHA1( YourSecretAccessKeyID, UTF-8-Encoding-Of( StringToSign ) ) ) ); |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<title>D3 GeoJSON in Leaflet</title> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.ie.css' rel='stylesheet'> | |
<![endif]--><style> | |
html, body, #map { height: 100%;width:100%; background:#020B26;position:absolute;} | |
body { padding: 0; margin: 0; } | |
path { stroke-linejoin; round; stroke-linecap: round; fill: none} |
creationTime = new Date() | |
profile = | |
name: '' | |
stripeId: '' | |
created: creationTime.getTime() | |
address: '' | |
city: '' | |
state: '' | |
country: '' | |
limit: 2 |
In addition to the Storybook for React setup, you'll also need to install these packages:
npm i -D @babel/core babel-loader css-loader style-loader