This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const strategies = { | |
cacheFirst(request) { | |
return caches.open(APPLICATION_CACHE).then((cache) => { | |
return cache.match(request).then((matching) => { | |
return matching || Promise.reject('no-match'); | |
}); | |
}); | |
}, | |
networkFirst(request, delay) { | |
return new Promise((resolve, reject) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* bin/daemon | |
* A simple Linux HTTP Daemon | |
*/ | |
require('daemon')(); | |
const cluster = require('cluster'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const node = document.querySelector('input[name="test"]'); | |
const p = document.querySelector('p'); | |
function Observable(subscribe) { | |
this.subscribe = subscribe; | |
} | |
Observable.fromEvent = (element, name) => { | |
return new Observable((observer) => { | |
const callback = (event) => observer.next(event); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global document Rx*/ | |
const link = document.querySelector('.nav-link'); | |
const link$ = Rx.Observable.fromEvent(link, 'click'); | |
const observer = { | |
next(event) { | |
console.log(event); | |
}, | |
error(err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import NotFound from './notfound'; | |
const Config = ($stateProvider, $urlRouterProvider, $locationProvider) => { | |
'ngInject'; | |
$stateProvider | |
.state('404', NotFound); | |
$locationProvider | |
.html5Mode(false) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<base href="/"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content="Jason Breitigan"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
["env", { | |
"modules": false | |
}], | |
"react" | |
], | |
"plugins": [] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url("common.css"); | |
.app { | |
height: 100%; | |
} | |
@media only screen { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const merge = require('webpack-merge'); | |
const Clean = require('clean-webpack-plugin'); | |
const Html = require('html-webpack-plugin'); | |
const Text = require('extract-text-webpack-plugin'); | |
const marked = require('marked'); | |
const renderer = new marked.Renderer(); |