Skip to content

Instantly share code, notes, and snippets.

View dahlia's full-sized avatar

Hong Minhee (洪 民憙) dahlia

View GitHub Profile
@paolocarrasco
paolocarrasco / README.md
Last active June 25, 2025 08:14
How to understand the `gpg failed to sign the data` problem in git

Problem

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

Debug

// Suppose you have a variable named `future` which implements the `Future` trait.
let future: impl Future = ...;
// This gist demonstrates how to run the future until completion using the `stdweb` crate.
// The various imports.
extern crate futures;
extern crate stdweb;
@tommyettinger
tommyettinger / mulberry32.c
Last active May 28, 2025 18:49
Mulberry32 PRNG
/* Written in 2017 by Tommy Ettinger ([email protected])
To the extent possible under law, the author has dedicated all copyright
and related and neighboring rights to this software to the public domain
worldwide. This software is distributed without any warranty.
See <http://creativecommons.org/publicdomain/zero/1.0/>. */
#include <stdint.h>
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active July 3, 2025 19:26
Hyperlinks in Terminal Emulators
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active June 26, 2025 13:48
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,

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.

@dahlia
dahlia / wsgi_typing.py
Last active June 10, 2018 07:09
WSGI application object type specified using typing
import types
from typing import (Any, Callable, Iterable, Mapping,
Optional, Sequence, Tuple, Union)
__all__ = ('Environ', 'ExcInfo', 'ResponseStream', 'StartResponse',
'StartResponseCallable', 'StartResponseCallableWithExcInfo',
'WriteCallable', 'WsgiApplication')
# https://www.python.org/dev/peps/pep-3333/#the-write-callable
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()