Skip to content

Instantly share code, notes, and snippets.

View surenkov's full-sized avatar
💨
I may be slow to respond.

Savva Surenkov surenkov

💨
I may be slow to respond.
View GitHub Profile
@surenkov
surenkov / lima-vz-docker.yaml
Last active August 30, 2023 10:16
Lima VM config with VirtioFS and macOS Virtualization Framework for Docker
vmType: "vz"
arch: "default"
images:
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months.
- location: "https://cloud-images.ubuntu.com/releases/23.04/release-20230829/ubuntu-23.04-server-cloudimg-arm64.img"
arch: "aarch64"
digest: "sha256:5316a0dc05d83b6aad277b338ec67837792d0d695db1b736a59c8117114b8deb"
- location: "https://cloud-images.ubuntu.com/releases/23.04/release-20230829/ubuntu-23.04-server-cloudimg-amd64.img"
@surenkov
surenkov / compressed_stream.py
Last active October 31, 2023 21:22
Gzip-compressed binary stream
from __future__ import annotations
import gzip
import io
import typing as ty
if ty.TYPE_CHECKING:
from collections.abc import Iterable, Iterator
DEFAULT_BLOCK_SIZE = 512 * 1024 # 512 KiB