Skip to content

Instantly share code, notes, and snippets.

@Dabolus
Dabolus / Deploying PWA Starter Kit to Firebase.md
Last active June 26, 2020 01:39
A simple guide that explains how to deploy PWA Starter Kit to Firebase

Note: this guide explains step by step how to add Firebase to PWA Starter Kit.

If you already have some Firebase knowledge and you just want to get everything ready out of the box, you might want to checkout the Firebase branch on the PWA Starter Kit repo, that already contains all the needed files.

Deploying prpl-server to Firebase

Firebase Hosting alone is not sufficient for hosting the prpl-server build since it requires some server-side processing of the user agent string. Instead, you will have to use Firebase Functions for that.

  1. Sign up for a Firebase account
@jefffriesen
jefffriesen / README.md
Last active November 4, 2024 23:30
US Zip Codes

This is a d3.js visualization of US zip codes.

Original zip code dataset from Geocommons.

5MB shapefile with properties such as zipcode, state, name, population, area, more.

http://geocommons.com/overlays/54893 (Thank you Bill Greer)

This converts it nicely:

<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=320; user-scalable=no" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>ColorThief Demo</title>
<script type="text/javascript" charset="utf-8" src="jquery-2.0.0.min.js"></script>
<script type="text/javascript" charset="utf-8" src="quantize.js"></script>
<script type="text/javascript" charset="utf-8" src="color-thief.js"></script>
@JohnDMathis
JohnDMathis / ModuleHelper - 3.js
Created May 8, 2013 05:26
ModuleHelper is a Marionette plug-in that facilitates dynamic loading of template files for modules.
// use handlebars instead of underscore templates
Marionette.TemplateCache.prototype.compileTemplate = function (rawTemplate) {
return Handlebars.compile(rawTemplate);
};
// workaround for a handlebars issue
// compiled templates get an extra text node generated
@JohnDMathis
JohnDMathis / ModuleHelper - simple
Created April 25, 2013 21:55
Loads template files dynamically for a Marionette's Module.
Marionette.ModuleHelper = (function(Marionette, _) {
"use strict";
var moduleHelper = { };
moduleHelper.templatePath = 'templates/';
moduleHelper.templateExt = ".html";
moduleHelper.templatePrefix = "";
@mbostock
mbostock / .block
Last active April 28, 2022 21:44 — forked from mbostock/.block
Sticky Force Layout
license: gpl-3.0