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 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
/** | |
* 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
<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
{ | |
"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
/** | |
* 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
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){ |
OlderNewer