Skip to content

Instantly share code, notes, and snippets.

View dahlia's full-sized avatar
Off work for the bereavement of my father

Hong Minhee (洪 民憙) dahlia

Off work for the bereavement of my father
View GitHub Profile


dahlia /
Last active July 5, 2022 17:11
Analyze conditional substructures of XML files exported from Korean Standard Language Dictionary (標準國語大辭典)

This script inductively analyzes relationships between conditional values and their dependent substructures from XML files exported from the [official website of Standard Korean Language Dictionary (標準國語大辭典)][1].[^1]

Tested with Python 3.9, but it would probably work with Python 3.8, and maybe even 3.7.

The usage is simple. Just pass all exported dictionary XML files into its arguments:

dahlia /
Last active October 23, 2022 09:44
Dirty workaround to let VS Code Live Share run on Apple silicon Macs without Rosetta 2

As of June 2022, VS Code's [Live Share] still does not work well on Apple silicon Macs (M1/M2 series) without [Rosetta 2]. Although [this bug is tracked in the official issue tracker on GitHub][1], unfortuneately, Live Share extension is not open source, so no outsiders can send any patch to address this bug to the upstream. Instead, I'd like to share a workaround I found:[^1]

  1. Install [.NET SDK] 6 (arm64) or higher. It's also available on Homebrew Cask: brew install --cask dotnet-sdk.

  2. Replace vsls-agent (no postfix) in

dahlia / README.rst
Last active January 11, 2022 04:40
Bencodex diff

Comparing two Bencodex binary files

A small CLI program to easily compare two Bencodex trees:

$ pip3 install --user -r requirements.txt
$ ./ ./a.dat ./b.dat
--- a.dat
dahlia / .gitignore
Last active June 16, 2021 00:55
dahlia / eclint.rb
Created May 15, 2021 03:33
eclint formula for Homebrew / As according to `brew audit` its GitLab repository is not notable enough (<30 forks and <75 stars), I could not submit this to the homebrew-core upstream.
class Eclint < Formula
desc "EditorConfig linter"
homepage ""
url ""
sha256 "81d8997a329edb0f598b56326cd34d007e59bb20885bfc21beca084d3d5a2f6c"
license "MIT"
head ""
depends_on "go" => :build
# A Python port of:
# You can build librandomx.{so,dylib} by the following command:
from ctypes import *
from ctypes.util import find_library
librandomx = cdll.LoadLibrary(find_library('librandomx'))
dahlia / opensearch.xml
Last active September 20, 2020 08:19
알라딘 OpenSearch
<?xml version="1.0" encoding="UTF-8"?>
<Description>알라딘 통합 검색</Description>
dahlia /
Last active February 15, 2021 16:56
My Python installer using pyenv
#!/usr/bin/env bash
set -e
dahlia /
Last active February 4, 2020 05:10
Count keys from multiple Bencodex data files
#!/usr/bin/env python3
"""Count keys from multiple Bencodex data files."""
import collections
import pathlib
import sys
from typing import Counter, Union
from bencodex import BValue, load