Skip to content

Instantly share code, notes, and snippets.

View khvn26's full-sized avatar

Kim Gustyr khvn26

  • Viana do Castelo, Portugal
  • 22:30 (UTC +01:00)
View GitHub Profile
# usage: mypy . -output json | python baseline.py
import json
import re
import sys
def parse_mypy_output(output: str) -> None:
# Parse the mypy output
# We're interested in the following fields:
# - `path` - the file path
@khvn26
khvn26 / steamos-vscode-docker-guide.md
Last active March 1, 2025 12:46
SteamOS VSCode + Docker guide

SteamOS VSCode + Docker guide

  1. Install Docker:

    sudo pacman -S docker
  2. Enable Docker systemctl unit:

@khvn26
khvn26 / bapk.sh
Created June 25, 2019 13:10
Slim Python multistage build, hacky but simple and apparently correct
#!/bin/sh -e
# --root заставляет apk ставить пакеты под нужным префиксом
# Но при этом нужно восстановить его работоспособность:
# --initdb воссоздаёт бд
# --keys-dir и --repositories-file указывают куда смотреть и чем авторизовываться (логично)
apk --initdb \
--root /build/ \
--keys-dir /etc/apk/keys \
--repositories-file /etc/apk/repositories \
"$@"
@khvn26
khvn26 / results.out
Created September 26, 2018 08:28
Python Websockets benchmark
websockets | 0.5335815649013966
wsaccel | 17.214408515021205
aiohttp | 0.7204610370099545