Skip to content

Instantly share code, notes, and snippets.

View bobdobbalina's full-sized avatar

Mike Grunwald bobdobbalina

View GitHub Profile
// Core assets
let coreAssets = [];
// On install, cache core assets
self.addEventListener('install', function (event) {
// Cache core assets
event.waitUntil(caches.open('app').then(function (cache) {
for (let asset of coreAssets) {
cache.add(new Request(asset));
@iamravenous
iamravenous / _easings.scss
Last active June 8, 2020 14:08
Animation timing functions variables in Sass
/*
* Animation timing functions variables in Sass
* Based on Easings by Andrey Sitnik (Autoprefixer / PostCSS) and Matthew Lein's easing animation tool.
* Also used on Velocity.js animation library.
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* http://easings.net/
* https://matthewlein.com/ceaser
* http://velocityjs.org/
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
@ecarter
ecarter / mapOrder.js
Created December 2, 2011 15:40
Order an array of objects based on another array order
/**
* Sort array of objects based on another array
*/
function mapOrder (array, order, key) {
array.sort( function (a, b) {
var A = a[key], B = b[key];