Skip to content

Instantly share code, notes, and snippets.

View modster's full-sized avatar
🧠

EM Greeff modster

🧠
View GitHub Profile
@modster
modster / 2019-https-localhost.md
Created April 17, 2023 03:57 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

self.addEventListener('message', (ev)=>{
//console.log('Web worker started with data: ', ev.data);
let data = ev.data.do;
switch(data){
// case 'Get Started':
// self.postMessage('Web Worker Started');
// break;
// case 'Other':
// self.postMessage('Other task...');
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Web Workers</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../video-pages/main.css">
</head>
<body>
<header>
@modster
modster / README.md
Last active April 15, 2023 19:00 — forked from prof3ssorSt3v3/index.html
Code from video about Queue Data Structures
@modster
modster / index.html
Created April 15, 2023 18:05 — forked from prof3ssorSt3v3/index.html
Code from video about all the CSS Math functions - min, max, clamp, calc, and minmax
<!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>min, max, minmax, clamp, calc</title>
<link rel="stylesheet" href="main.css" />
</head>
<body>
@modster
modster / README.md
Last active April 15, 2023 18:35 — forked from prof3ssorSt3v3/index.html
Code from video about all the CSS Math functions - min, max, clamp, calc, and minmax
//fetch using a Request and a Headers objects
//using jsonplaceholder for the data
const uri = 'http://jsonplaceholder.typicode.com/users';
//new Request(uri)
//new Request(uri, options)
//options - method, headers, body, mode
//methods: GET, POST, PUT, DELETE, OPTIONS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS box-sizing</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="main.css"/>
<style>
html{
box-sizing: border-box;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Div vs. Span</title>
<style>
span{
color: hsla(0deg, 50%, 100%, 0.5);
background-color: cornflowerblue;
}
@modster
modster / README.md
Last active April 15, 2023 17:13 — forked from prof3ssorSt3v3/README.md
Code from video about import-maps

Basic Setup

video tutorial

First turn your project into an npm one with npm init -y

Next install the package of your choice. In this video I used Luxon

npm install luxon