Skip to content

Instantly share code, notes, and snippets.

View listochkin's full-sized avatar

Андрей Листочкин (Andrei Listochkin) listochkin

View GitHub Profile
listochkin /
Created August 9, 2023 21:21
objdump to C-string of opcodes
#!/usr/bin/env perl
# SPDX-License-Identifier: CC0 OR 0BSD OR MIT OR Apache-2.0
# 2023 Andrei Listochkin
# Usage: objdump -d program | ./ <address_ranges>
# where <address_ranges> can be individual addresses or ranges
# (e.g., `1131-1137 114c 10d8 1171`)
# This script parses the output of 'objdump -d program' and generates formatted
listochkin /
Last active June 29, 2023 10:45
Exercise: custom data for a plugin system

Custom Data for a Plugin System

This exercise is inspired by a real-world scenario encountered by one of Ferrous Systems' customers.

Imagine that we are building the next version of the best code editor out there, and for it we want to introduce a system of plugins that require configuration. Some configuration options are common: every plugin has a name, for example. Other settings can be absolutely unique.

We want to design a type that would allow us to store arbitrary custom data. It should play nicely with the rest of our code base. We want to be able to:

  • Debug-print our plugin configuration
  • compare different configs
listochkin / Cargo.toml
Created June 19, 2023 22:44
Fetcher test for pnpm
name = "fetch_test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at
debug = true
listochkin /
Created June 9, 2023 21:53
Exercise: an interactive TCP echo server

Implement an interactive TCP echo server.

Here's how an interaction with it would look like from a client point of view. You connect to it using netcat, for example:

nc localhost 7878

and type in one line of text. As soon as you hit enter, the server sends the line back but keeps the connection opened. You can type another line and get it back, and so on.

Here's a bit of code to get you started:

listochkin / emoji-regex.js
Created December 1, 2021 10:43
Emoji Regular Expression for JavaScript
// adapted from
export const emojiRegex =

Примечание от Андрея: Это не моя вакансия, но я хочу помочь Павлу найти себе инженера в команду. Оригинальный текст ниже. Хочешь узнать больше - приходи в чат Frontend UA Jobs.

Привіт, хотів нагадати що ми все ще шукаємо Middle React Native розробника на класний продукт)

Хто ми шо ми:

Uniform Teeth - американська компанія котра вирівнює зуби за допомогою алайнерів (такі прозорі штуки на зубах, майже як Invisalign тільки ми кращі ;) Загалом людей тут під 150 чоловік, але конкренто інжинірингу близько 10 і ми зараз активно працюємо щоб це виправити. Це все ще стартап, в лютому підняли другий раунд інвестицій майже весь планють пустити на посилення команд з розробки.

Бізнес модель проста як двері: ви нам гроші - ми вам рівненькі зуби і чарівну усмішку через рік-два. Кешфлоу позитивний, ростемо як на дріжджах.

listochkin / 2018.js
Last active March 24, 2022 03:15 — forked from Jack-Works/2018.js
cRAzY eSnEXt (*all* proposals mixed in)
#! Aaaaaaaaaaa this is JS!!!
// This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics
// Enjoy!!!
// Created at Nov 23, 2018
for await(const x of (new A //
|> do { //
case(?) { //
when {val}: class {
listochkin /
Created October 17, 2018 15:27
No root prompt for Turbo Boost Switcher on TouchID Macs

No root prompt for Turbo Boost Switcher on TouchID Macs


  1. Enable TouchID for sudo. Open /etc/pam.d/sudo and add auth sufficient before other rules.
  2. Remove Turbo Boost Switcher from login items
  3. Put to /usr/local/bin/
  4. chmod +x /usr/local/bin/
  5. Put turboboostswitcher.asroot.plist to ~/Library/LaunchAgents
  6. Run launchctl load ~/Library/LaunchAgents/turboboostswitcher.asroot.plist
listochkin /
Created July 9, 2018 12:24 — forked from andyshinn/
pbcopy over SSH


  • Add pbcopy.plist to your ~/Library/LaunchAgents/ folder.
  • Launch the listener with launchctl load ~/Library/LaunchAgents/pbcopy.plist.
  • Add RemoteForward 2224 in your ~/.ssh/config file under your Host * or specific hosts sections.
  • Add [ -n "$SSH_CLIENT" ] && alias pbcopy="nc localhost 2224" to your remote ~/.bash_profile or other shell profile.
  • Enjoy pbcopy remotely!
listochkin /
Created January 24, 2017 01:13 Verification

Keybase proof

I hereby claim:

  • I am listochkin on github.
  • I am listochkin ( on keybase.
  • I have a public key ASAsRsmUuljyfl6KLsdW5GxpyCXmMzFSUcFrnCxk3ukIhAo

To claim this, I am signing this object: