This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function diffdata(legacy,shiny) { | |
let delta={} | |
for (const key in legacy){ | |
const oldval = legacy[key]; | |
const newval = shiny[key]; | |
if (typeof(oldval)==='object' && typeof(newval)==='object'){ | |
delta[key] = diffdata(oldval,newval) | |
} else if (oldval==newval){ | |
delta[key]="✅"; | |
} else if(Math.abs((oldval-newval)/oldval)<0.001){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
.main-window { | |
background-color: #111111; | |
text-align: center; | |
display: block; | |
margin: auto; | |
margin-top: 10px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rels": {}, | |
"items": [ | |
{ | |
"id": "navigation", | |
"type": [ | |
"h-navigation", | |
"h-section" | |
], | |
"properties": {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="h-entry entry __omnibear-selected-item"> | |
<div class="p-author h-card header"> | |
<img src="https://files.mastodon.social/accounts/avatars/109/257/143/813/191/096/original/b87fef5a3f693f10.png" class="u-photo"> | |
<a class="p-name" href="https://mastodon.social/@minimammoth">Helena Pérez Valle</a> @<span class="p-nickname">minimammoth</span> | |
</div> | |
<details > | |
<summary class="p-summary">DnD, Combat <span class="showmore">Show More</span></summary> | |
<div class="e-content content"> | |
<p>The Pudding King takes a Legendary Action and sends a Giant Amoeba to explode next to Crysanthea. She rolls a nat 20 but is still hit hard, and goes down. <a href="https://mastodon.social/tags/DnD" class="mention hashtag" rel="tag">#<span>DnD</span></a> <a href="https://mastodon.social/tags/DnDMondays" class="mention hashtag" rel="tag">#<span>DnDMondays</span></a> <a href="https://mastodon.social/tags/combat" class="mention hashtag" rel="tag">#<span>combat</span></a></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* toggle buttons wtf | |
*/ | |
td { | |
border-bottom: 1px solid #ddd; | |
padding: .5rem .75rem; | |
} | |
tr {border: pink;} | |
.toggle_tv:not(:checked) ~ table .service-DTV {display:none;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function diffdata($legacy,$shiny) { | |
$delta=array(); | |
foreach ($legacy as $key => $oldval){ | |
$newval = $shiny[$key]; | |
if ($oldval==$newval){ | |
$delta[$key]="✅"; | |
} else if (is_array($oldval) && is_array($newval)){ | |
$delta[$key] = diffdata($oldval,$newval); | |
} else { | |
$delta[$key]="❌ expected: $oldval<br>❌ returned: $newval"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create_folder($path, $slug) | |
{ | |
$folderPath = $basePath = $path . $slug; | |
$counter=0; | |
while (file_exists($folderPath){ | |
$counter++; | |
$folderPath = $basePath . "-$counter"; | |
} | |
mkdir($folderPath); //Creates the folder | |
$fn = $folderPath . '/listen.md'; //Sets the filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function diffdatastripped(legacy,shiny) { | |
let delta={},allgood=true; | |
for (const key in legacy){ | |
const oldval = legacy[key]; | |
const newval = shiny[key]; | |
if (typeof(oldval)==='object' && typeof(newval)==='object'){ | |
delta[key] = diffdatastripped(oldval,newval) | |
if (delta[key] !="✅") { | |
allgood=false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<svg height="600" width="600" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<defs > | |
<g id="l0"> | |
<rect width="600" height="600" fill="black"/> | |
</g> | |
<g id="l1"> | |
<use xlink:href="#l0" transform="translate(0,0) scale(0.3333333333333333)"/> | |
<use xlink:href="#l0" transform="translate(200,0) scale(0.3333333333333333)"/> | |
<use xlink:href="#l0" transform="translate(0,200) scale(0.3333333333333333)"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nodevember @leeb: is going to give us a talk on how we think about architecture, not just code. "Architecture is a metaphor" | |
#nodevember @leeb: Architecture originates from studying the arch, an infinitely composable shape that allows us to build amazing things. | |
#nodevember @leeb: Pollios tells us architecture has: 1) Firmitas - durability 2) Utilitas - Suitable for purposes 3) Venustas - beauty | |
#nodevember @leeb: Architecture is about making fundamental structural choices. In software, we choose the elements of abstraction. | |
#nodevember @leeb: The problem of software architecture is trying to figure out what changed. So we try to add things that...change more? | |
#nodevember @leeb: When models and views have to listen to each other, there is cascading problems and syncing. | |
#nodevember @leeb: While REST helped us model our data in terms of a network service, it fails when we rely on other data. | |
#nodevember @leeb: If we tightly control what can change in the first place, immutability gives us new principl |
NewerOlder