Skip to content

Instantly share code, notes, and snippets.

View Fabian295's full-sized avatar
🏠
Working from home

Fabian Kanhai Fabian295

🏠
Working from home
  • the Netherlands
  • 02:24 (UTC +02:00)
View GitHub Profile
<!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;
@Fabian295
Fabian295 / index.html
Created March 21, 2024 11:55 — forked from prof3ssorSt3v3/index.html
Code from video about practical uses for Array.from() and all of it's parameters applied to Objects and NodeLists and copied Arrays
<!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" />
<title>Document</title>
<script src="main.js" type="module"></script>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Using Regular Expressions</title>
<style>
html {
<?php
//Arrays in PHP
//keys can be integers or strings
// [] v5.4 and up
//$toppings = ['Ketchup', 'Mustard', 'Pickles', 'Onions'];
$toppings = array('Ketchup', 'Mustard', 'Pickles', 'Onions');
$toppings[] = 'Lettuce'; //$toppings[4]
echo $toppings[2];
@Fabian295
Fabian295 / app.js
Created March 28, 2021 03:59 — forked from prof3ssorSt3v3/app.js
Introduction to Service Workers code from video
const APP = {
SW: null,
init() {
//called after DOMContentLoaded
if ('serviceWorker' in navigator) {
// 1. Register a service worker hosted at the root of the
// site using the default scope.
navigator.serviceWorker
.register('/sw.js', {
scope: '/',
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Notification API</title>
<meta name="viewport" content="width=device-width">
</head>
<body>
<h1>Notification API</h1>
<p id="output"></p>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Online / Offline</title>
<meta name="viewport" content="width=device-width"/>
<style>
h1{
text-align: center;
}
@Fabian295
Fabian295 / index.html
Last active March 26, 2021 16:43 — forked from prof3ssorSt3v3/index.html
PWA Web Manifest Files
<!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" />
<title>Web Manifest Files</title>
<link rel="stylesheet" href="main.css" />
<!-- pwa manifest -->
<link rel="manifest" href="/manifest.json" />
@Fabian295
Fabian295 / app.js
Last active March 26, 2021 08:32 — forked from prof3ssorSt3v3/app.js
PWAs Online, Offline, or undecided
const APP = {
isOnline: 'onLine' in navigator && navigator.onLine,
//attempt to set the isOnline value
images: [
'/img/bored.gif',
'/img/fail.gif',
'/img/i-won.gif',
'/img/MiSSiNG_IMAGE.jpg',
],
init() {
@Fabian295
Fabian295 / 404.html
Created March 24, 2021 14:21 — forked from prof3ssorSt3v3/404.html
PWA 4 - New Fetch Requirements for Service Workers in PWAs
<!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" />
<title>404</title>
<link rel="stylesheet" href="main.css" />
</head>
<body>