Skip to content

Instantly share code, notes, and snippets.

View modster's full-sized avatar
🧠

EM Greeff modster

🧠
View GitHub Profile
<!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;
//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
@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
@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 19:00 — forked from prof3ssorSt3v3/index.html
Code from video about Queue Data Structures
<!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>
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...');
@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).

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Grid &amp; grid-auto-flow</title>
<style>
*{
box-sizing: border-box;
}
.box{
/***
* Dynamic Object properties using square brackets
*/
let beverage = 'Beer';
const myObj = {
a: 1,
b: 2,
c: 3,
food: 'cheese',