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
dahlia / lisp.rb
Created September 2, 2010 07:52
30 minutes Lisp in Ruby
# 30 minutes Lisp in Ruby
# Hong Minhee <http://dahlia.kr/>
#
# This Lisp implementation does not provide a s-expression reader.
# Instead, it uses Ruby syntax like following code:
#
# [:def, :factorial,
# [:lambda, [:n],
# [:if, [:"=", :n, 1],
# 1,
@dahlia
dahlia / hstore.py
Created February 18, 2012 14:58
PostgreSQL hstore + SQLAlchemy
""":mod:`hstore` --- Using PostgreSQL hstore with SQLAlchemy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. note::
I released it under Public Domain. Feel free to use!
It provides :class:`Hstore` type which makes you to store Python
dictionaries into hstore columns in PostgreSQL. For example::
@dahlia
dahlia / AGREE.md
Last active August 3, 2023 09:45
Nine Corporation Individual Contributor Assignment Agreement

Nine Corporation Individual Contributor Assignment Agreement

Thank you for your interest in contributing to Nine Corporation ("We" or "Us").

This contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please follow the instructions at the end. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.

1. Definitions

"You" means the individual who Submits a Contribution to Us.

openpgp4fpr:374B15AF323796A62AB1BCE3C429ECD57EED6CCA

@dahlia
dahlia / README.md
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
dahlia / README.md
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
dahlia / index.php
Created October 28, 2010 17:11
Simple Image Resizing API
<?php
# Simple Image Resizing API
#
# A simple HTTP API for resizing an image (given by the URL).
# This small and dirty ad hoc web application is entirely written in
# PHP 5.3+ with GD. The source code is distributed under Public License.
function is_url($string, $scheme = null) {
$url = parse_url($string);
if (!isset($url['scheme'])) return false;
@dahlia
dahlia / rider.md
Last active March 23, 2022 10:04 — forked from earlbread/rider.md
Libplanet 개발환경 설정 - Rider

Libplanet 개발 환경 설정 (Rider)

[Libplanet]은 널리 쓰이는 게임 엔진인 Unity를 염두에 두어, C#으로 작성되었습니다. 따라서 C# 개발 환경이 필요합니다. 다행히 .NET은 요 몇 년 사이 여러 플랫폼에서 두루 개발할 수 있는 여건이 마련되었습니다. 이 문서는 Linux, macOS, Windows 모두에서 Libplanet 개발을 하는 데에 필요한 환경을 설정하고 빌드하는 방법을 설명합니다.

따라 하면서 잘 안되는 게 있으시면 [저희 Discord 서버][1]에 있는

@dahlia
dahlia / vscode.md
Last active January 14, 2022 09:10
Libplanet 개발 환경 설정

Libplanet 개발 환경 설정 (VS Code)

[Libplanet]은 널리 쓰이는 게임 엔진인 Unity를 염두에 두어, C#으로 작성되었습니다. 따라서 C# 개발 환경이 필요합니다. 다행히 .NET은 요 몇 년 사이 여러 플랫폼에서 두루 개발할 수 있는 여건이 마련되었습니다. 이 문서는 Linux, macOS, Windows 모두에서 Libplanet 개발을 하는 데에 필요한 환경을 설정하고 빌드하는 방법을 설명합니다.

따라하면서 잘 안되는 게 있으시면 [저희 Discord 서버][1]에 있는

@dahlia
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
$ ./bdiff.py ./a.dat ./b.dat
--- a.dat