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
mohanpedala /
Last active May 24, 2024 16:16
set -e, -u, -o, -x pipefail explanation
egmontkob /
Last active May 24, 2024 08:00
Hyperlinks in Terminal Emulators
sindresorhus /
Last active May 24, 2024 02:36
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
endolith / Has weird right-to-left characters.txt
Last active May 23, 2024 11:02
Unicode kaomoji smileys emoticons emoji

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active May 20, 2024 15:38
webRTC stun / turn server list
to check if the server works -
paolocarrasco /
Last active May 20, 2024 10:32
How to understand the `gpg failed to sign the data` problem in git


You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object


/* The world's smallest Brainfuck interpreter in C, by Kang Seonghoon
* */
dahlia /
Created August 20, 2012 09:07
[virtualenvwrapper] automatic workon hook on cd
export PROJECTS_HOME="$HOME/Projects"
function has_virtualenv__() {
if [[ "$VIRTUAL_ENV" == "" ]]; then
if [[ $(dirname "`pwd`") == $PROJECTS_HOME ]]; then
venvname=$(basename "`pwd`")
if [[ -d "$WORKON_HOME/$venvname" ]]; then
workon "$venvname"
drewkerr / get-focus-mode.js
Last active April 23, 2024 12:34
Read the current Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
const app = Application.currentApplication()
app.includeStandardAdditions = true
function getJSON(path) {
const fullPath = path.replace(/^~/, app.pathTo('home folder'))
const contents =
return JSON.parse(contents)
function run() {