Skip to content

Instantly share code, notes, and snippets.

@octaharon
octaharon / addendum.md
Last active November 20, 2023 06:50
Раздаточные материалы к докладу VideoTech'23

Автоматное программирование и его применение в видеостриминге

Доклад

Google Slides

Автор

Александр Усков, tg: octaharon

Транспайлинг асинхронного кода в автоматный код

Babel демонстрирует, как асинхронный код можно сделать синхронным при помощи машины Мура и статического анализа.

@octaharon
octaharon / slack_filter.user.js
Created November 13, 2020 15:07
Tampermonkey script for filtering slack messages by user
// ==UserScript==
// @name Slack filter messages by UID
// @namespace Slack
// @version 0.1
// @description removes messages from unwanted people in slack channels and threads, or replaces them with kittens
// @author Octaharon <Alexander Uskov>
// @include https://app.slack.com/client/*
// @grant none
// ==/UserScript==
@octaharon
octaharon / console-override.js
Created June 10, 2018 09:35
Intercept/override/disable console calls
const consoleOverride = {
'log': options.debug && options.verbose,
'debug': options.debug,
'info': options.verbose
}
Object.keys(consoleOverride).forEach(cmd => {
let oldMethod = console[cmd].bind(console);
console[cmd] = function (...args) {
if (consoleOverride[cmd])
@octaharon
octaharon / multiClass.js
Created June 5, 2018 08:01
Multiple inheritance ES6
export class multiClass {
// Inherit method to create base classes.
static inherit(..._bases) {
class classes {
// The base classes
get base() {
return _bases;
}