Skip to content

Instantly share code, notes, and snippets.

View localnerve's full-sized avatar

Alex Grant localnerve

View GitHub Profile
@localnerve
localnerve / flux-react-example-sw-debug-snippet
Created March 29, 2016 02:09
Snippet to add visionmedia/debug flag to IndexedDB for service-worker
(function () {
var request = window.indexedDB.open("service-worker", 1);
request.onerror = function (event) {
console.error('failed to open service-worker database', request.errorCode);
};
request.onsuccess = function (event) {
var db = event.target.result;
var transaction = db.transaction(['state'], 'readwrite');
<html>
<body>
<h1>Hello World</h1>
<p>This is a test of an html file as a gist</p>
</body>
</html>
<!--
Copyright 2016 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@localnerve
localnerve / ccss.js
Created November 5, 2016 13:16
Compile css build step w/o svg2png fallback
/***
* Copyright (c) 2016 Alex Grant (@localnerve), LocalNerve LLC
* Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms.
*/
import gulp from 'gulp';
import gulpSvgmin from 'gulp-svgmin';
import gulpSass from 'gulp-sass';
import gulpPostcss from 'gulp-postcss';
import gulpIf from 'gulp-if';
import gulpCssmin from 'gulp-cssmin';