Skip to content

Instantly share code, notes, and snippets.

View JanDW's full-sized avatar
🕳️

Jan De Wilde JanDW

🕳️
View GitHub Profile

TIA Website Updates · Jan 10, 2024

  • Andromeda bio pic
    • Nacul → Bio
    • Add to carousel on `tiarchitects/projects/andromeda swap out`` for Andromeda rendering
  • New article for Principles of Ecological Architecture
    • Sandy will supply image
  • Add the 2 new books
    • Omega
      • T - Get image (Nina can do mockup?)

Remco the Betta not doing great

Tank + Creatures

On Nov 13, 2023, I set up this 10 gallon dirted, sand-capped, and planted tank. I don’t vacuum the sand.

Contains:

  • a Betta, added Nov 25. Currently sick.
@JanDW
JanDW / aspect-ratio-layout-2.html
Created November 10, 2023 02:32
Using parent CSS selector (:has()) to target the desired layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Container Queries Javascript II</title>
<body>
<main>
<style>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Container Queries Javascript</title>
<body>
<main>
<style>
*,
@JanDW
JanDW / outliner-snippet.js
Last active September 23, 2022 13:47
Applies outline and background-color in order to more readily understand layouts.
if (!document.querySelector("#debugStyles")) {
const style = document.createElement("style");
style.setAttribute("id", "debugStyles");
style.innerHTML = `
.debug-boxes * {
outline: 1px solid blue;
background-color: rgba(0,255,255,.05);
}
`;
document.head.appendChild(style);
@JanDW
JanDW / Untitled-1
Created September 22, 2022 18:34
Section instance consistently fails to render in page editor
instrument.ts:129 TypeError: Cannot read properties of undefined (reading 'label')
at Select.tsx:28:73
at Ru (react-dom.production.min.js:262:359)
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Wo (react-dom.production.min.js:122:325)
at Au (react-dom.production.min.js:261:308)
at gu (react-dom.production.min.js:243:50)
at react-dom.production.min.js:123:115
at t.unstable_runWithPriority (scheduler.production.min.js:18:343)
at Wo (react-dom.production.min.js:122:325)
function shuffleArray(arr) {
for (let i = arr.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[arr[i], arr[j]] = [arr[j], arr[i]];
}
}
const montyHall = (n) => {
let wins = 0;
let doors = ["goat", "goat", "car"];
@JanDW
JanDW / boonie_Monte_Carlo.m
Created August 31, 2020 01:59
Runs a Monte Carlo experiment of the Boonie simulation
% Runs a Monte Carlo experiment of the Boonie simulation
%
%
% Input(s)
% nMC: Number of Monte Carlo iterations
%
% Output(s)
% Days: Vector of days until Boonie gets caught
%
% Example:
@JanDW
JanDW / boonieSim.m
Created August 31, 2020 01:23
Simulates the Boonie Conundrum
% Simulates the Boonie Conundrum
%
%
% Input(s)
% DispOn: Displays the graph of student and teacher rumor knowledge
% Modify simulation parameters in the code below
%
% Output(s)
% studentFraction: Fraction of student population that knows the rumor
% teacherFraction: Fraction of teacher population that knows the rumor
@JanDW
JanDW / .eleventy.config.js
Created August 15, 2020 18:23 — forked from danielpost/.eleventy.config.js
Eleventy: Purge CSS for each html file
const { PurgeCSS } = require('purgecss');
/**
* Remove any CSS not used on the page and inline the remaining CSS in the
* <head>.
*
* @see {@link https://github.com/FullHuman/purgecss}
*/
eleventyConfig.addTransform('purge-and-inline-css', async (content, outputPath) => {
if (process.env.ELEVENTY_ENV !== 'production' || !outputPath.endsWith('.html')) {