This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{lib, ...}: { | |
toBase64 = text: let | |
inherit (lib) sublist mod stringToCharacters concatMapStrings; | |
inherit (lib.strings) charToInt; | |
inherit (builtins) substring foldl' genList elemAt length concatStringsSep stringLength; | |
lookup = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
sliceN = size: list: n: sublist (n * size) size list; | |
pows = [(64 * 64 * 64) (64 * 64) 64 1]; | |
intSextets = i: map (j: mod (i / j) 64) pows; | |
compose = f: g: x: f (g x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"layout": { | |
"id": "com.apple.keylayout.Colemak", | |
"localizedName": "Colemak", | |
"lang": "en" | |
}, | |
"rawMapping": { | |
"KeyA": { | |
"value": "a", | |
"valueIsDeadKey": false, |