This file contains 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"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>SVG Progress Display for File Downloads</title> | |
<style> | |
:root { | |
--bgcolor: hsl(220, 20%, 70%); | |
--focuscolor: hsl(220, 80%, 50%); |
This file contains 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"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Cache Storage</title> | |
<link rel="stylesheet" href="./css/main.css" /> | |
<script type="module" src="./js/main.js"></script> | |
</head> | |
<body> |
This file contains 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
* { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
html { | |
font-size: 16px; | |
font-weight: 300; | |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, | |
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; |
This file contains 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
//finite state machine | |
const machine = { | |
state: "SOBER", | |
transitions: { | |
SOBER: { | |
drink: function(beverage, second) { | |
console.log("current state", this.state); | |
console.log("\tdrinking", beverage.type); //second would be undefined | |
if (beverage.type == "alcohol") { | |
console.log("\tAdios inhibitions!"); |
This file contains 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
//https://www.npmjs.com/package/cordova-plugin-android-volume | |
//plugin to retrieve the android system volumes | |
// https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-media/index.html | |
// cordova media plugin | |
let app = { | |
track: { | |
src: 'file:///android_asset/www/media/fight-club.mp3', | |
title: 'Fight Club Rules', |
This file contains 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"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Form Events</title> | |
<style> | |
* { | |
padding: 0; | |
margin: 0; |
This file contains 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"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> | |
<link rel="stylesheet" href="style.css" /> | |
<title>CSS :is :where :has</title> | |
<link href="./main.css" rel="stylesheet" /> | |
</head> |
This file contains 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 { uid } from './uid.js'; | |
console.log(uid()); | |
//nothing else to import because we are using the built in methods | |
//https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase | |
const IDB = (function init() { | |
let db = null; | |
let objectStore = null; | |
let DBOpenReq = indexedDB.open('WhiskeyDB', 6); |
This file contains 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 http = require("http"); | |
const fs = require("fs"); | |
const server = http.createServer(function(req, res) { | |
let img = __dirname + "/pod.jpg"; | |
fs.access(img, fs.constants.F_OK, err => { | |
//check that we can access the file | |
console.log(`${img} ${err ? "does not exist" : "exists"}`); | |
}); |
This file contains 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"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>HTML Templates</title> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
.temp{ | |
background-color: cornflowerblue; | |
color: #fff; |
NewerOlder