Skip to content

Instantly share code, notes, and snippets.

View MihaelIsaev's full-sized avatar
🔋
Working on Swift Stream IDE

Mikhail Isaev aka iMike MihaelIsaev

🔋
Working on Swift Stream IDE
View GitHub Profile
@MihaelIsaev
MihaelIsaev / AGENTS.md
Created September 18, 2026 15:20
Xcode 27 works on macOS Sequoia 15.7.3

AGENTS.md — Technical Reference for Coding Agents and LLMs

This file is the authoritative engineering handoff for maintaining, debugging, or porting the Xcode 27-on-Sequoia compatibility patch.

Read README.md first for the user-facing workflow. This document explains why the patch exists, what exact binary changes are authorized, which experiments already failed, which runtime boundaries are proven, and how to reason about future failures without repeating months of reverse-engineering work.


1. Scope and final classification

@MihaelIsaev
MihaelIsaev / serial_client.py
Created April 26, 2025 11:57
Serial Server + Client to forward serial port into docker container
#!/usr/bin/env python3
import os
import pty
import select
import socket
import serial
import threading
import termios
import fcntl
import sys
@MihaelIsaev
MihaelIsaev / Instruction.md
Last active April 18, 2025 04:57
How to patch Swift `static-linux-sdk` with `mimalloc` step-by-step

According to the Performance penalty from the Static Linux SDK post I would like to provide a step-by-step instruction of how to patch static-linux-sdk with mimalloc

Why?

It is important for swift apps – especially for server-side apps – to be performant

Doesn't Static Linux SDK already have mimalloc?

Great question! Maybe in the future — who knows?

If you're from the future, you can check your SDK by running

@MihaelIsaev
MihaelIsaev / bash.ts
Created October 23, 2024 17:32
Node.js multiple persistent shells instead of multiple spawns
///
// This file is MIT licensed.
// This implementation in real life is actually slower than calling `spawn` multiple times.
// But I just want to save it as a concept.
// If you have ideas of how to improve its speed please feel free to contribute.
///
import { ChildProcessWithoutNullStreams, exec, spawn } from 'child_process'
import { isNull } from 'util'
import { LogLevel, print } from './webber'
import { TimeMeasure } from './helpers/timeMeasureHelper'

What's new in Swift 6 (Swiftify article translated into Russian)

Что нового в Swift 6 (перевод статьи Swiftify)

Apple планирует выпустить Swift 6 в сентябре 2024 года наряду с Xcode 16. Это будет первое крупное обновление Swift за последние пять лет, начиная с Swift 5. Этот выпуск приурочен к 10-летнему юбилею Swift. За эти годы Swift значительно развился, от простого улучшения Objective-C до безопасного, многофункционального и производительного языка, который легко использовать.

Apple ранее упоминала, что будут последовательно выпускаться версии Swift 5.x, вводящие инкрементальные изменения и новые функции для подготовки к Swift 6. Основные цели включали улучшение поддержки параллелизма и модели владения памятью. На данный момент они были достигнуты в значительной степени.

Давайте кратко вспомним эволюцию версий Swift

@MihaelIsaev
MihaelIsaev / AwesomeWSPing.swift
Created July 4, 2022 21:23
AwesomeWS automatic ping implementation
class YourCustomWS: ClassicObserver, LifecycleHandler {
var pingTask: RepeatedTask?
var waitForPongAttempts: [WaiterForPongAttempt] = []
public required init (app: Application, key: String, path: String, exchangeMode: ExchangeMode) {
super.init(app: app, key: key, path: path, exchangeMode: exchangeMode)
pingTask = app.eventLoop.scheduleRepeatedTask(initialDelay: .seconds(5), delay: .seconds(5)) { [weak self] task in
guard let self = self else { return }
self.waitForPongAttempts.enumerated().forEach { i, object in
if object.attempt >= 2 {
@MihaelIsaev
MihaelIsaev / proxy.pac
Created March 26, 2021 11:35 — forked from swinton/proxy.pac
Example proxy.pac, using a SOCKS proxy for certain hosts.
function FindProxyForURL(url, host) {
var useSocks = ["imgur.com"];
for (var i= 0; i < useSocks.length; i++) {
if (shExpMatch(host, useSocks[i])) {
return "SOCKS localhost:9999";
}
}
return "DIRECT";
function getCache(name) {
return new Promise((resolve, reject) => {
const version = 1;
const request = indexedDB.open(name, version);
request.onsuccess = event => {
const db = event.target.result;
/*
* Returns a Promise that resolves with an object
@MihaelIsaev
MihaelIsaev / ARMDebianUbuntu.md
Created September 5, 2020 01:32 — forked from Liryna/ARMDebianUbuntu.md
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

@MihaelIsaev
MihaelIsaev / UIKitPlus-TabBarImplementation.swift
Created June 26, 2020 11:13
Custom TabBar implementation for UIKitPlus. Not beautiful cause not wrapped, just sources. But it works well.
import UIKitPlus
class MainViewController: ViewController {
override var statusBarStyle: StatusBarStyle {
if let controller = controllers[current]?.protocolController {
if let controller = controller as? ViewController {
return controller.statusBarStyle
}
return .from(controller.preferredStatusBarStyle)
}