Skip to content

Instantly share code, notes, and snippets.

Anna Shilova thesparrow

  • Los Angeles
Block or report user

Report or block thesparrow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thesparrow
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
thesparrow / mouseOver
Created Feb 1, 2015
Data visualization with D3
View mouseOver
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
</head>
<body>
<div id= "intro">
<p> Our first introduction to data visualization </p>
</div>
<div id="viz"></div>
View Hi.py
import python
print "Hello World!"
You can’t perform that action at this time.