Skip to content

Instantly share code, notes, and snippets.

View brodo's full-sized avatar

Julian Dax brodo

View GitHub Profile
@brodo
brodo / ANSI.md
Created February 1, 2022 09:11 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>DNSSettings</key>
<dict>
<key>DNSProtocol</key>
/**
* Takes a string and returns a 24 byte base64url encoded hash of the string. Uses the FNV-1a hash function.
* @param str
* @returns {string}
*/
export function fnvBase64UrlHash(str) {
return bigIntToBase64Url(fnvHash96(str));
}
/**