Skip to content

Instantly share code, notes, and snippets.

По алфавиту

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

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

#!/usr/bin/env zsh
while true; do
sleep 0.5
xprop \
-id "`xprop -root _NET_ACTIVE_WINDOW | cut -d ' ' -f 5`" \
-f _KDE_NET_WM_BLUR_BEHIND_REGION 32c \
-set _KDE_NET_WM_BLUR_BEHIND_REGION 0
done
@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:

@miyaokamarina
miyaokamarina / Await.ts
Created June 6, 2019 15:10
Recursive Promise unwrapper for TypeScript
// Works exactly as `await`/`then` in JavaScript, but for types!
// Of course, it can’t handle deep nesting (≥45±n levels) due to
// TypeScript limitations. But 45 is enough.
// License: MIT.
type Await<a> = {
0: Await<a extends PromiseLike<infer b> ? b : never>,
1: a,
}[a extends PromiseLike<any> ? 0 : 1];
@miyaokamarina
miyaokamarina / path.ts
Created June 7, 2019 08:30
Almost type-safe `path` function for TypeScript
type Falsy = '' | 0n | 0 | false | null | undefined | void;
type If<c, t, f> = c extends Falsy ? f : t;
type Cast<a, b> = a extends b ? a : b;
type Size<t> = t extends readonly any[] ? t['length'] : never;
type Head<t> = t extends readonly [any, ...any[]] ? t[0] : never;
type Last<t> = t extends readonly any[] ? t[Size<Tail<t>>] : never;
type Init<t, x = readonly []> = { 0: Init<Tail<t>, Append<x, Head<t>>>; 1: x }[If<Size<Tail<t>>, 0, 1>];
type Append<t, e> = Concat<t, readonly [e]>;
type Reverse<t, x = readonly []> = { 0: Reverse<Tail<t>, Prepend<Head<t>, x>>; 1: x }[If<Size<t>, 0, 1>];
@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 14, 2020 10:45
4G radio frequencies table

bands

  • band — the band number,
  • ulfl — the lowest uplink frequency of band,
  • ulfh — the highest uplink frequency of band,
  • ulnl — the lowest uplink EARFCN of band,
  • ulnh — the highest uplink EARFCN of band,
  • ulno — the offset required to calculate uplink EARFCNs,
  • dlfl — the lowest downlink frequency of band,
  • dlfh — the highest downlink frequency of band,
@miyaokamarina
miyaokamarina / README.md
Created September 23, 2020 09:27
Node’s `path.normalize`*, but a POSIX Shell function.

* Unlike the original, this function removes trailind slashes, and keeps leading ./ segments.

@miyaokamarina
miyaokamarina / README.md
Last active September 25, 2020 09:34
Type-level 16-bit ALU in TS.

Type-level binary arithmetics in TS.

  • Utilities:
    • 4-bit parsers:
      • Bin.
      • Dec.
      • Hex.
    • 4-bit formatters:
      • Bin.
  • Dec.
@miyaokamarina
miyaokamarina / wakanim-ru-fixes.css
Created April 23, 2021 01:14
Wakanum RU web player fixes
.episodeBtns,
.price-tag,
.shares,
.header-main_item.-desktop.-credits,
.header-main_user_button,
.episodeNPEp-subtitle,
.comments-button,
.episode_buttons,
.border-list_item:last-child,
.jw-icon-rewind,