Skip to content

Instantly share code, notes, and snippets.

@fwSara95h
fwSara95h / _HTML_Heading_Nesting_Parser-README.md
Last active July 9, 2025 05:54
Parse HTML such that the nesting that is implicit by header levels becomes explicit

HTML Heading Nesting Parser

This gist contains a Python tool for converting flat HTML documents—especially those with nested content indicated only by header levels (like <h1>, <h2>, etc.)—into a structured JSON object that reflects the implicit hierarchy.

Originally inspired by this StackOverflow question from @psychicesp, this script is useful for:

  • Web scraping content-heavy pages (like menus, outlines, legal docs)
  • Explicitly inferring structure from heading levels
  • Preserving content hierarchy when working with markdown-to-HTML output
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created July 9, 2025 05:46
Rimworld output log published using HugsLib
This file has been truncated, but you can view the full file.
Log uploaded on Tuesday, July 8, 2025, 11:46:20 PM
Loaded mods:
Auto Mod Config(Garethp.ModlistConfigurator)[mv:1.0.0]: ModlistConfigurator(0.0.0)
Prepatcher(zetrith.prepatcher): 0Harmony(2.3.3), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0)
Harmony(brrainz.harmony)[mv:2.3.4.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Fishery - Modding Library(bs.fishery): 0PrepatcherAPI(1.2.0), 1Fishery(0.6.1), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Core(Ludeon.RimWorld): (no assemblies)
Better Log - Fix your errors(bs.betterlog): 0PrepatcherAPI(1.2.0), 1Fishery(av:0.6.1,fv:0.5.1.2), BetterLog(1.1.0), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Performance Fish(bs.performance): PerformanceFish(0.6.2)
@guigui-dev-hiptiger
guigui-dev-hiptiger / GenerativeAICourseSchedule.md
Last active July 9, 2025 05:59
Generative AI Course Schedule
日程 時間帯 無料公開範囲(予定)
第1回 7/12(土) 9:00〜10:00 第1章|AIリテラシー基礎(冒頭全文)
第2回 7/19(土) 12:00〜13:00 第3章|プロンプトエンジニアリング(Prompt Design 10(プロンプト設計10原則))の一部
第3回 7/26(土) 15:00〜16:00 特典プロンプトの1つを全文体験
@sina-programer
sina-programer / perfect_cube.py
Created July 9, 2025 05:45
create a perfect cube shape in any dimensions easily by this python function
def perfect_cube(n):
return [
tuple(map(int, row[2:].rjust(n, '0')))
for row in map(bin, range(2**n))
]
if __name__ == "__main__":
from pprint import pprint
@doriandres
doriandres / Indigenous_names_in_Costa_Rica.json
Last active July 9, 2025 05:51
Indigenous names in Costa Rica (for code names in projects)
[
"Aserrí",
"Bagatzi",
"Barú ",
"Bexu",
"Bore",
"Boruca",
"Bribrí",
"Brunka",
"Brus",
컴퓨터 관련 메모
server {
listen 80;
server_name fsyl.cc;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created July 9, 2025 05:43
Rimworld output log published using HugsLib
Log uploaded on Tuesday, July 8, 2025, 11:43:13 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.4.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
[FSF] Filth Vanishes With Rain And Time(FrozenSnowFox.FilthVanishesWithRainAndTime): (no assemblies)
[KV] RimFridge(rimfridge.kv.rw)[ov:1.3.1.3]: (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.5]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.5)
@asifulmamun
asifulmamun / Huffman Coding | Greedy Algorithm | DSA | PHP
Created July 9, 2025 05:42
Huffman Coding | Greedy Algorithm | DSA | PHP
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['image'])) {
$image = $_FILES['image']['tmp_name'];
$imageData = file_get_contents($image);
$base64 = base64_encode($imageData);
$data = $base64;
}
?>
[
{
"status": "This is a placeholder to ensure the file is not empty.",
"hardware_id": "none"
}
]