Skip to main content

Posts

JavaScript: Capture URL Pattern (Aserejé Vibe)

Recent posts

Batding

Peace upon ye and all your kin. ☘️ I was thinking about dragon. Because there's dinosaur. 🤔 We will see how batding is born in this. It's the logically civilised version of dingbat. All of its meaning. The Word "Dinosaur" It was coined by, you bet that right, Sir Richard Owen — in 1842. He was a British biologist and comparative anatomist. It was during the "British Association for the Advancement of Science" venue. The term was nicked from the Greek, obviously. Deinos (ΔΕΙΝΟΣ or δεινός) = terrible, fearsome, mighty. Saurus (ΣΑΥΡΟΣ or σαῦρος) = lizard, reptile. So if we're going full Greek revival: ΔΕΙΝΟΣΑΥΡΟΣ or δεινόσαυρος = deinosaurus ➡️ dinosauria ➡️ dinosaur ➡️ dino ➡️ batding ✨ ⬆️ The birth. Owen was examining some very large, fragmented fossil bones. To group them together as a new "superorder" of extinct reptiles, he made up this scientific umbrella term. He wanted to impress the public and fun...

JavaScript: Calculate Duration Since

Hope you're well. 🎩 I find YouTube's date-trimming on video thumbnails rather amusing. I did it back then with my close-enough vibe. But recently, when I compared it to actual YouTube frontend, hm... 🤔 That's different. Nifty, that. Analysis As I've observed, the pattern goes like this: 0 day = 0 day. 1 day = 1 day. 2 days = 2 days. ... 6 days = 1 week. 7 days = 1 week. 8 days = 1 week. 9 days = 1 week. ... 12 days = 2 weeks. 13 days = 2 weeks. 14 days = 2 weeks. ... 1 month, 2 weeks, X days = 2 months. ⬆️ See the pattern? The trimming logic goes as such: Let: Y = years M = months W = weeks D = days and M_max = 12 (months per year) W_max = 4 (weeks per month, approximated) D_max = 7 (days per week) Then the rounding rule: if D ≥ ½·D_max ➡️ W = W + 1, D = 0 if W ≥ ½·W_max ➡️ M = M + 1, W = 0 if M ≥ ½·M_max ➡️ Y = Y + 1, M = 0 Hence the result is: ceil(Y, M, W, D) ⬆️ Increment the larger unit whenever ...

Ouija

This board. Ouija, they pronounce it as WEE-juh . 🤔🤷 But to me, that's clearly two words combined: oui + ja = ouija . Now why were they combined? That's comical. Oui = yes. It's a French word. A bit like how English pronounces "we". Sometimes, "way". For instance in French telly, Oui, alors... ⬅️ that would sound, that. Ja = yes. A Germanic word. Usually, pronounced as "ya". We-ya. Like that Bruce-Lee yell. It's specifically Bruce Lee. Mike Tyson perhaps did it, but not recorded. Please Enable JavaScript. 👄 Ouija pronunciation. (Bruce facepalms.) If we utter each with proper pronunciation, "ouija" will sound like a confused French in a Bavarian tavern with a Cockney barman. (Barman.) Two quid, please. (Ouija bloke.) Oui... Ja! (Barman.) 🤨 Oi, guv. Two quid. (Ouija bloke.) Deux? NEIN! 🍺 Ouijahahahaha! 🏃‍♀️‍➡️🏃‍♀️‍➡️🏃‍♀️‍➡️ (Barman.) 👀 Blimey!...

JavaScript: The replaceChildren()

Good day. 🎩 In JavaScript, when we want to empty or replace the content of a container element, we usually do this: // 1. Empty the container. container.innerHTML = ""; // 2. Replace the content. container.innerHTML = "the replacement"; Now, we have replaceChildren() — documentation on MDN . It was added mid-2020, part of the DOM Living Standard, first implemented in browsers between mid and late 2020 (around the ECMAScript 2020 timeframe, though technically not an ES feature). ES = ECMAScript, not Espagnol. Usage // 1. Empty the container. container.replaceChildren(); // 2. Replace with a single node. container.replaceChildren(newNode); // 3. Replace with multiple nodes. container.replaceChildren(newNode, otherNewNode); // 4. You can even pass strings — they'll be converted to text nodes. container.replaceChildren("Humphry Davy approves this example!"); newNode and otherNewNode are variables. For instance: const newNode = docum...

Orcs

This specimen ⬇️ ⬆️ That orc. Please Enable JavaScript. The modern concept of the orc in entertainment originates largely from J.R.R. Tolkien , who popularised them in The Lord of the Rings as brutish, corrupted creatures bred for war by dark powers. Though inspired by earlier mythological beings such as goblins, ogres, and various demonic entities from European folklore, Tolkien gave orcs a distinct identity — organised, militaristic, and inherently malicious. His influence shaped fantasy literature, tabletop games like Dungeons & Dragons , and video games, where orcs are now a staple enemy race, often portrayed with green skin, muscular builds, and a tribal warrior culture. Over time, variations have emerged, but most still trace back to Tolkien's original wartime allegory. Brutish. 🤔 If they were British, composed creatures bred by tea and honour, I postulate they would go like: Biscuits? What a splendid day, this is. And they don...
Monkey Raptor uses cookies or biscuits 🍪 for analytics, functionality, and advertisements. More info in Privacy Policy