Skip to content

Instantly share code, notes, and snippets.

@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:

#!/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

По алфавиту

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

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

su
mount /dev/sda4 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi

antimicro authenticator davinci-resolve emoji-keyboard grub2-editor-frameworks grub2-theme-preview hardcode-fixer-git hardcode-tray kotlin-native-bin kwin-effect-shapecorners-git

@miyaokamarina
miyaokamarina / UTF-8: Unmasked.md
Last active December 24, 2020 12:03
UTF-8: Unmasked

UTF-8: Unmasked

NB: This explanation assumes you are familiar with Unicode and differences between Unicode itself and encodings.

When I tried to understand UTF-8, first I read some decoders sources. They use bitwise masks and control flow, which is good for performance, but kind of bad for understanding.

So, here is UTF-8 explanation without masks. (And with PEG.js grammar.)

@miyaokamarina
miyaokamarina / json.ts
Created October 1, 2018 15:23
Safe JSON type in TypeScript
interface JsonArray extends Array<JsonValue> {}
interface JsonObject {
[key: string]: JsonValue;
}
export type JsonValue = null | boolean | number | string | JsonArray | JsonObject;
ssh-keygen
Set-Alias ssh-agent "$env:ProgramFiles\git\usr\bin\ssh-agent.exe"
Set-Alias ssh-add "$env:ProgramFiles\git\usr\bin\ssh-add.exe"
Start-SshAgent -Quiet
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub | Set-Clipboard
@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
@miyaokamarina
miyaokamarina / 01.sh
Last active September 23, 2018 00:42
su
mount /dev/nvme0n1p3 /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi