Skip to content

Instantly share code, notes, and snippets.

View miyaokamarina's full-sized avatar
😶

Marina Miyaoka miyaokamarina

😶
View GitHub Profile
@Myndex
Myndex / ForTheLuvOfColor.md
Last active October 23, 2024 17:40
A comparative look at Lab and Luv colorspaces, and LCh.

Where's The Luv?

An Examination of the CIELAB and CIELUV colorspaces.

It is exciting to see so many new color features for the CSS Color Module. There are nevertheless a couple items that resulted in a "raised eyebrow response". This Gist is mainly going to focus on one: the use of the LAB version of LCh instead of LUV LCh, which may be better suited for the task but appears to have been dismissed as if irrellevant.

I DISAGREE. Luv is in common use and very relevant, and LuvLCh or one of the several LuvLCh variants has distinct advantages over LabLCh for use cases such as choosing color for web content for displays.

Myth Destruction

@miyaokamarina
miyaokamarina / README.md
Last active August 16, 2019 07:40
Classes list/dict reducer for TypeScript.

classlist.ts

Reduces list of anything that looks like classname to single space-separated string.

NB: Allows /[\w-]/ only in classnames. Classnames with other characters will be excluded from resulting list.

Requirements

  • Symbol.prototype.description (optional),
  • Reflect (optional).
@miyaokamarina
miyaokamarina / README.md
Last active August 16, 2019 07:41
Asynchronous generators multiplexer for TypeScript/JavaScript

Asynchronous generators mutiplexer

This function allows you to multiplex multiple asynchronous generators iterables into one.

Items from all iterables will be streamed to resulting one as soon as they come from source iterable.

And last but not least, you can add new iterables to multiplexer after it was created!

Example:

По алфавиту

Аачи и Ссипак, простите, я хз, как корейский правильно транскрибировать. Концентрированное безумие неироничной буквальной наркомании в прямом эфире без смс без регистрации со встроенным трояном анальным чипом.

Акацуки но Ёна. По сути — хороший фентезийный батл-сенён в китайской эстетике из 10, который по какому-то недоразумению издавался для шожо-аудитории. Реверс-гарем присутствует, но уж поверь, он достаточно ненавязчив

@miyaokamarina
miyaokamarina / 00-README.md
Last active April 6, 2021 23:59
Arch package list generator

Known bugs

  • Incorrectly handles packages with Provides field.

Usage

  • ./native.sh > native.txt
  • ./external.sh > external.txt
@jupdike
jupdike / IntersectTwoCircles.js
Last active October 17, 2024 13:10
Find the intersections (two points) of two circles, if they intersect at all
// based on the math here:
// http://math.stackexchange.com/a/1367732
// x1,y1 is the center of the first circle, with radius r1
// x2,y2 is the center of the second ricle, with radius r2
function intersectTwoCircles(x1,y1,r1, x2,y2,r2) {
var centerdx = x1 - x2;
var centerdy = y1 - y2;
var R = Math.sqrt(centerdx * centerdx + centerdy * centerdy);
if (!(Math.abs(r1 - r2) <= R && R <= r1 + r2)) { // no intersection