Skip to content

Instantly share code, notes, and snippets.

I've come up with an interesting design for a hash map that instead of bucket lists, recursivly embeds more hash maps, but with a new key for each level.

Each hash map is super simple with two slots and hashe keys are 1 bit. However, the initial value is hashed to a 32-bit integer where each bit in the number is the key for each level in the recursive hash map.

In C, my structure looks like:

struct hash_tree_node {
  void *key;
 void *value;
@fnky
fnky / ANSI.md
Last active September 2, 2025 02:56
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@dragoncoder047
dragoncoder047 / airdrop.py
Last active October 7, 2023 21:12
Airdrop for non-Apple users
#! /usr/bin/env python3
from flask import Flask, request, send_file, abort
from os import walk, sep, makedirs, getpid
from os.path import exists, basename
from werkzeug.utils import secure_filename
from subprocess import Popen
app = Flask(__name__)