Skip to content

Instantly share code, notes, and snippets.

Anna thesparrow

  • Los Angeles
View GitHub Profile
thesparrow / notify-user-of-update.js
Created Feb 17, 2018
This snippet shows to to notify user when updates are available using a service worker
View notify-user-of-update.js
//Offline Web Applications course on Udacity : Grow with Google Application Course
//code is placed in the controller file - not in the service worker itself
IndexController.prototype._registerServiceWorker = function () {
if (!navigator.serviceWorker) return; //feature detection
var indexController = this;
navigator.serviceWorker.register('/sw.js').then(function (reg) {
//if no controller found - latest version is already loaded
thesparrow / mouseOver
Created Feb 1, 2015
Data visualization with D3
View mouseOver
<!DOCTYPE html>
<script type="text/javascript" src=""></script>
<div id= "intro">
<p> Our first introduction to data visualization </p>
<div id="viz"></div>
import python
print "Hello World!"
You can’t perform that action at this time.