Skip to content

Instantly share code, notes, and snippets.

View sw-boilerplate.js
// 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));
View lazy-loading.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Lazy Loading</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body {
View index.html
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - Monster flip card</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
View war-refactor.html
<!DOCTYPE html>
<html>
<head>
<title>War</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 40em;
width: 88%;
View caesar-cipher.html
<!DOCTYPE html>
<html>
<head>
<title>Caesar Cipher</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 40em;
width: 88%;
View react-todos-with-reef.html
<!DOCTYPE html>
<html>
<head>
<title>React Todos in Vanilla JS</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 40em;
width: 88%;
}
View react-todo-to-vanilla-js.html
<!DOCTYPE html>
<html>
<head>
<title>React Todos in Vanilla JS</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 40em;
width: 88%;
}
View accordions.html
<!DOCTYPE html>
<html>
<head>
<title>Accordions</title>
<style type="text/css">
body {
margin: 0 auto;
max-width: 40em;
width: 88%;