Skip to content

Instantly share code, notes, and snippets.

View Alpakash's full-sized avatar
😎
HeLLo

Akash Soedamah Alpakash

😎
HeLLo
View GitHub Profile
@Okkk7744
Okkk7744 / Export bookmarks from Dia.txt
Created August 15, 2025 10:57
Export bookmarks from Dia
import json, os, html
src = os.path.expanduser("~/Library/Application Support/Dia/User Data/Default/Bookmarks")
dst = os.path.expanduser("~/Desktop/bookmarks.html")
with open(src, "r", encoding="utf-8") as f:
data = json.load(f)
lines = ['<!DOCTYPE NETSCAPE-Bookmark-file-1>',
'<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">',
'<TITLE>Bookmarks</TITLE><H1>Bookmarks</H1><DL><p>']
@andywer
andywer / _readme.md
Last active January 8, 2025 04:42
React - Functional error boundaries

React - Functional error boundaries

Thanks to React hooks you have now happily turned all your classes into functional components.

Wait, all your components? Not quite. There is one thing that can still only be implemented using classes: Error boundaries.

There is just no functional equivalent for componentDidCatch and deriveStateFromError yet.

Proposed solution

@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active January 30, 2025 09:22
How to use images for radio buttons (input-radio).