Skip to content

Instantly share code, notes, and snippets.

View myfonj's full-sized avatar

Michal Čaplygin myfonj

View GitHub Profile
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
/\p{General_Category=Lowercase_Letter}/u
/\p{Script=Latin}/u
Count:759
a b c d e f g h i j k l m n o p q r s t u v w x y z ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ ā ă ą ć ĉ ċ č ď đ ē ĕ ė ę ě ĝ ğ ġ ģ ĥ ħ ĩ ī ĭ į ı ij ĵ ķ ĸ ĺ ļ ľ ŀ ł ń ņ ň ʼn ŋ ō ŏ ő œ ŕ ŗ ř ś ŝ ş š ţ ť ŧ ũ ū ŭ ů ű ų ŵ ŷ ź ż ž ſ ƀ ƃ ƅ ƈ ƌ ƍ ƒ ƕ ƙ ƚ ƛ ƞ ơ ƣ ƥ ƨ ƪ ƫ ƭ ư ƴ ƶ ƹ ƺ ƽ ƾ ƿ dž lj nj ǎ ǐ ǒ ǔ ǖ ǘ ǚ ǜ ǝ ǟ ǡ ǣ ǥ ǧ ǩ ǫ ǭ ǯ ǰ dz ǵ ǹ ǻ ǽ ǿ ȁ ȃ ȅ ȇ ȉ ȋ ȍ ȏ ȑ ȓ ȕ ȗ ș ț ȝ ȟ ȡ ȣ ȥ ȧ ȩ ȫ ȭ ȯ ȱ ȳ ȴ ȵ ȶ ȷ ȸ ȹ ȼ ȿ ɀ ɂ ɇ ɉ ɋ ɍ ɏ ɐ ɑ ɒ ɓ ɔ ɕ ɖ ɗ ɘ ə ɚ ɛ ɜ ɝ ɞ ɟ ɠ ɡ ɢ ɣ ɤ ɥ ɦ ɧ ɨ ɩ ɪ ɫ ɬ ɭ ɮ ɯ ɰ ɱ ɲ ɳ ɴ ɵ ɶ ɷ ɸ ɹ ɺ ɻ ɼ ɽ ɾ ɿ ʀ ʁ ʂ ʃ ʄ ʅ ʆ ʇ ʈ ʉ ʊ ʋ ʌ ʍ ʎ ʏ ʐ ʑ ʒ ʓ ʕ ʖ ʗ ʘ ʙ ʚ ʛ ʜ ʝ ʞ ʟ ʠ ʡ ʢ ʣ ʤ ʥ ʦ ʧ ʨ ʩ ʪ ʫ ʬ ʭ ʮ ʯ ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ᴐ ᴑ ᴒ ᴓ ᴔ ᴕ ᴖ ᴗ ᴘ ᴙ ᴚ ᴛ ᴜ ᴝ ᴞ ᴟ ᴠ ᴡ ᴢ ᴣ ᴤ ᴥ ᵫ ᵬ ᵭ ᵮ ᵯ ᵰ ᵱ ᵲ ᵳ ᵴ ᵵ ᵶ ᵷ ᵹ ᵺ ᵻ ᵼ ᵽ ᵾ ᵿ ᶀ ᶁ ᶂ ᶃ ᶄ ᶅ ᶆ ᶇ ᶈ ᶉ ᶊ ᶋ ᶌ ᶍ ᶎ ᶏ ᶐ ᶑ ᶒ ᶓ ᶔ ᶕ ᶖ ᶗ ᶘ ᶙ ᶚ ḁ ḃ ḅ ḇ ḉ ḋ ḍ ḏ ḑ ḓ ḕ ḗ ḙ ḛ ḝ ḟ ḡ ḣ ḥ ḧ ḩ ḫ ḭ ḯ ḱ ḳ ḵ ḷ ḹ ḻ ḽ ḿ ṁ ṃ ṅ ṇ ṉ
icevers dussyurm watiang blemy chitrced unytilic exyenen hawsen foodis jarrksed pantetze dipins dusheds peaglets krat vimpod feanbing rubltum undeed woows tosi greneres azlicas furater osttide tuvirch pispaher plusa albrmo jurplits paspie istrring oveinted fotsaste beathes jarr boookel sheut boact sactir rutfy tondy oprtted renger tuggsied maidoies frinksh staleles hukuene itralals tiseabed sumbi marenge verwalle laffiah gelerned setlll ineries smayl whaelied fooamoid upamo overaced idmaled dedaffs prer rettla pexysint upublind stheam sndaleer folllere rardined edjuste stunyd vilwsese kreoreng nialemia vias ovealily teiottic doliedst mungler gapadis saglonia yaues langieng muthe sicqutes wevked sibeed modirant prabwoss achow nawewite gleelate nouedas chaices egeiates disphmpy sayaoff nenhsit dysealy cobmeded bortrous linve gustered lileny grckeul arambast lotiven miectite bebikng cugjet bowfiang kasplil authomed ceddner regrosed fisoy wepors scrroic undgames freanit feaglis shogaer virmera turatrs clals roiai
@myfonj
myfonj / dabblet.css
Last active October 17, 2024 14:17
font-feature-values styleset test for Arial and Verdana
/* font-feature-values styleset test for Arial and Verdana */
@font-feature-values Arial { @styleset {slabbed-I: 1; } }
@font-feature-values Verdana { @styleset { slabless-I: 1; } }
(()=>{
const l = 26 // lower
const u = 26 // upper
const d = 10 // digits
const length = 8 // size
const possible = (l + u + d)**length
const invalid =
(l + d)**length // missing upper
+ (u + d)**length // missing lower
+ (u + l)**length // missing digit
@myfonj
myfonj / dabblet.css
Created August 12, 2024 19:12
Chrome radial-gradient closest-side color stop nearing 100% clamps to infinity
/** Chrome radial-gradient closest-side color stop nearing 100% clamps to infinity
*/
.a { background-image: radial-gradient(closest-side, red 50%, white 0) }
.b { background-image: radial-gradient(closest-side, red 99%, white 0) }
.c { background-image: radial-gradient(closest-side, red 99.609371185302727214061491167740314267575740814208984374%, white 0)}
.d { background-image: radial-gradient(closest-side, red 99.609371185302727214061491167740314267575740814208984375%, white 0)}
.e { background-image: radial-gradient(closest-side, red 100%, white 0)}
p { width: 15vw; height: 15vw; margin-right: 2vw; background-color: #ccc; float: left; word-break: break-all; word-wrap: break-word; border: 1px solid; }
@namespace "http://www.w3.org/1999/xhtml";
/*
Matches any non-built in element *from the HTML namespace*
- Credits: https://meiert.com/en/indices/html-elements/ (every existing tag)
- Data obtained from the page through devtools console:
copy($$('th[scope="row"] a code')
.map(_ => _.textContent)
.filter(_ => HTMLUnknownElement !== document.createElement(_).constructor)
.join()
)
javascript:/*pub↔edit*/(function (mappings) {
const currentURL = String(document.location.href);
const currentHost = document.location.hostname;
const currentProtocol = (document.location.protocol + '//');
const gi = '.github.io';
const gr = /github.com\/([^\/]+)\/\1.github.io\/edit\/([^\/]+)\//;
let gh_handle = '';
if ( currentHost.endsWith(gi) ) {
gh_handle = currentHost.replace(gi,'');
} else if(gr.test(currentURL)) {
// https://stackoverflow.com/questions/40958727/javascript-generate-unique-number-based-on-string
(() => {
function base0xFFFFtoBigInt(str) {
const base = BigInt(0xFFFF);
let result = BigInt(0);
let pow = 0;
let i = str.length;
while (i-->0) {
const charCode = BigInt(str.charCodeAt(i));
@myfonj
myfonj / objectStringifyToWallOfTextWithFullPaths.js
Last active February 2, 2024 19:48
Object Stringify to Wall of Text With Full Paths
/**
* Wall of text
* @param {Object} inputVar
* @returns {string}
* @description Takes nested object ("JSON") and returns its serialized "wall of text" representation:
* - Each scalar value is printed on its own line, after its full path.
* - Strings are quoted.
* - Complex values are converted to their string representation.
* - Dates are converted to ISO 8601 strings.
* Input:
@myfonj
myfonj / semver.2.0.0.modified.bnf
Last active October 16, 2023 12:19
semver.bnf
# taken from https://semver.org/spec/v2.0.0.html#backusnaur-form-grammar-for-valid-semver-versions
# modified to be "more clear"
<semver> ::= <version>
| <version> "-" <pre>
| <version> "+" <build>
| <version> "-" <pre> "+" <build>
<version> ::= <major> "." <minor> "." <patch>