Skip to content

Instantly share code, notes, and snippets.

View Slach's full-sized avatar
💭
deep diving into kuberntes

Eugene Klimov Slach

💭
deep diving into kuberntes
View GitHub Profile
@Slach
Slach / README.md
Created June 5, 2026 04:21
ClickHouse ReplicatedAccessStorage TOCTOU race: freshly created ROLE evicted from local cache -> CREATE USER/QUOTA ... <role> fails with UNKNOWN_ROLE (Code 511)

ClickHouse ReplicatedAccessStorage TOCTOU race — reproducer

Reproduces a server-side race in ClickHouse when RBAC is stored in Keeper (<user_directories><replicated>). A freshly created ROLE is evicted from the local in-memory cache by the background watch thread, so the very next statement that resolves the role by name fails with:

Code: 511. There is no role `...` in `user directories`. (UNKNOWN_ROLE)

Presto изнутри: как устроен движок Opera 12 — и стоит ли его воскрешать

Большой технический разбор браузерного движка Presto — того самого, на котором работала Opera вплоть до версии 12.15. Исходники движка утекли в сеть в 2017 году; я взял этот архив, собрал его под современным Linux и Windows и провёл несколько недель, разбираясь, как он устроен. Ниже — подробная карта движка: архитектура и инженерные узоры, система сборки, JavaScript-движок Carakan, интерфейс браузера и его неотделимость от движка, модель потоков, поддержка 32 и 64 бит, внутренние идиомы, тесты, самые честные комментарии разработчиков — и развёрнутые ответы на вопросы, которые задаёт каждый, кто видит такой код: можно ли его причесать по канонам чистой архитектуры, не переписать ли всё на Rust, что и в каком порядке стоит улучшать — и врали ли в Opera, когда отказывались открыть исходники, ссылаясь на их «плохое состояние».


Зачем вообще смотреть на мёртвый движок

Сегодня существует ровно три живых браузерных движка, способны

@markrogersjr
markrogersjr / gpt_oss_flash.md
Last active December 25, 2025 23:22
GPT-OSS with Flash Attention and Memory-Efficient Attention via PyTorch-Native SDPA

GPT-OSS with Flash Attention and Memory-Efficient Attention via PyTorch-Native SDPA

from time import time
import warnings

import torch
import transformers
@EvilFreelancer
EvilFreelancer / Dockerfile
Last active November 11, 2025 17:54
mem-agent MCP setup with vLLM on RTX 4090
FROM python:3.11-slim
# Install system dependencies
RUN apt update \
&& apt install -fy \
git curl build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install uv and add to path
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
@oficsu
oficsu / reassemble-gpt-drive.sh
Last active October 1, 2025 09:54
Reassemble selected partitions into a new virtual disk and derive GPT partition table properties from the old one
#!/bin/bash
set -eu
# MIT License
#
# Copyright (c) 2025 Ofee Oficsu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@miraneko
miraneko / slutbot1.jl
Created April 1, 2025 04:44
набросок кода для шлюхоботов :)
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright 2025 Mira Ciel Nekomimi-Sireneva
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
@da-moon
da-moon / build-zed.ps1
Last active August 9, 2025 22:13
Powershell script to build and setup latest version of zed on windows
# Zed Build and Update Script for Windows
# This script builds or updates Zed from source and sets up a command-line interface.
# Enable strict mode
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
# Configuration
$ZedRepo = "https://github.com/zed-industries/zed.git"
$BuildDir = "$env:USERPROFILE\zed-build"
@eapotapov
eapotapov / config-wsl
Created July 21, 2024 15:37
Updated config-wsl for WSL kernel 6.6 (merged vars from 5.15) according to https://github.com/microsoft/WSL/issues/11742
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 6.6.29.1 Kernel Configuration - Updated
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100
@timothyham
timothyham / ipv6guide.md
Last active May 10, 2026 19:51
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@Slach
Slach / backup-cronjob.yaml
Last active July 19, 2024 11:55
clickhouse-backup CronJob examples
apiVersion: batch/v1
kind: CronJob
metadata:
name: clickhouse-backup-cron
spec:
# every day at 00:00
# schedule: "0 0 * * *"
schedule: "* * * * *"
concurrencyPolicy: "Forbid"
jobTemplate: