Definitely not comprehensive. This is meant to be a basic memory aid with links to get more details. I'll add to it over time.
$ npm install mongoose --save
const mongoose = require('mongoose');
var a = ["sdfdf", "http://oooooolol"], | |
handleNetErr = function(e) { return e }; | |
Promise.all(fetch('sdfdsf').catch(handleNetErr), fetch('http://invalidurl').catch(handleNetErr)) | |
.then(function(sdf, invalid) { | |
console.log(sdf, invalid) // [Response, TypeError] | |
}) | |
.catch(function(err) { | |
console.log(err); | |
}) |
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
// Offline Web Applications course on Udacity https://classroom.udacity.com/courses/ud899 | |
//When a browser runs a service worker for the first time, an event is fired within it, 'install'. This can be used | |
//to trigger functions to download assets and save them to the cache, using the Cache API | |
//Started with snippet from https://gist.github.com/luke-denton/ef791e5150470814a7a155cd85b1bf80 | |
var staticCacheName = "my-cache-v2"; //Update the cache version | |
self.addEventListener('install', function(event) { | |
var urlsToCache = [ |
// Initialization | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const postcssImport = require('postcss-easy-import'); | |
const BrowserSyncPlugin = require('browser-sync-webpack-plugin'); | |
const path = require('path'); | |
const StyleLintPlugin = require('stylelint-webpack-plugin'); | |
const APP = path.join(__dirname, 'app'); |