Remove 1px bar at top of full-screen Firefox

If you have a keen eye, you probably noticed the 1-pixel black bar at the top of your screen when you enter F11-fullscreen in Firefox. To fix this, you'll need to create this file: /* …/Profiles/xxxxxxxx.default-esr/chrome/userChrome.css */ #fullscr-toggler { // background-color: red; display: none; } (If you can't figure out how to open that file or create it in the first place, this tutorial seems pretty good for Windows. …

Bijection between sets and multisets

To take a multiset and reversibly transform it into a set of the same cardinality … start with the multiset's smallest element, add 0 to it; then go to the next element (which might be a duplicate), and add 1 to it (which will guarantee it's no longer a duplicate); then go to the next element (which might still be a duplicate of the first), and add 2 to it (which will guarantee it's no longer a duplicate of the first or second elements), and so on. After this transformation is applied, you'll have a set with no duplicates, from a k−1-elements-larger universe, that can easily be transformed back by just subtracting instead of adding!

Python has no(?) multiset

I saw an online resource that claimed “The collections.Counter class in the Python standard library implements a multiset (or bag) type that allows elements in the set to have more than one occurrence.” However, (and despite the fact that he is quoting comments in the CPython source code,) this is misleading. While the collections.Counter class does allow you to have more than 1 occurrence of elements in a set, …

Weird issues trying to transfer a domain (XYZ's EPP infrastructure broken?)

tldr: XYZ infrastructure is literally collapsing, they couldn't transfer in one of their own domains without a staff override. Initial transfer attempt Namecheap e-mails me the “transfer Authorization Code” Gen.xyz web interface claims “Invalid EPP Code” I contact Gen.xyz support Gen.xyz staff tells me“Please request a new EPP code from Namecheap” I contact Namecheap support via web chat “I need a new EPP for my domain, ishygddt.xyz; XYZ support …

EC point serialization formats

I looked into this when trying to make a piece of toy software to serialize and de-serialize *all* OpenSSH-supported public key formats. While OpenSSH uses standardized formats for private keys, the ssh-* AAAA/3NzaC0… format you're used to pasting into remote servers is actually a "proprietary" (though with freely-licensed spec and implementation) encoding—it's not JSON, and not any standardized BER/DER codec; instead, it's mostly a Length-Value encoding (think TLV without the T) …

the real frozendict was the standard library we neglected along the way

If you need a quick immutable representation of dictionaries, but can't be bothered with a 3rd-party library, why not try frozenset(dict_items)? It is immutable. It is in the standard library. It is unordered, so you're guaranteed that frozenset([('a', 1), ('b', 2)]) == frozenset([('b', 2), ('a', 1)]). And it is the case that, for dictionaries with all immutable values (which is implied by the problem statement anyway), dict(frozenset(d.items())) == d. …

IA5string definition

From ITU-T Rec. X.680 (02/21): C.5.7 IA5String [is] mapped into UniversalString by mapping each character into the UniversalString character that has the identical (32-bit) value in the BER encoding of UniversalString as the (8-bit) value of the BER encoding of IA5String[.] 41.6 The characters which can appear in the UniversalString type are any of the characters allowed by ISO/IEC 10646 [aka Unicode]. 43.8 For IA5String, [the] entire character set …