Skip to content

Instantly share code, notes, and snippets.

View phpclub's full-sized avatar
🎯
Focusing

Alexandr Smirnov phpclub

🎯
Focusing
View GitHub Profile
@phpclub
phpclub / k3s-etcd-commands.md
Created July 12, 2025 19:18 — forked from superseb/k3s-etcd-commands.md
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version

Create a highly available k3s cluster with external datastore

Prereqs

For this particular setup we will need 3 machines to act as kubernetes (k3s) masters and one machine to act as a datastore

The datastore will be a mysql (mariadb) server although you can choose different options

The operating system chosen for this task is Debian 11 (theoretically the setup can be performed on any linux machine)

@phpclub
phpclub / remove-all-from-docker.md
Created November 27, 2025 05:19 — forked from tomasevich/remove-all-from-docker.md
Удалить/очистить все данные Докера (контейнеры, образы, тома и сети)

Удалить/очистить все данные Докера (контейнеры, образы, тома и сети)

Одной строкой

docker stop $(docker ps -qa) && docker rm $(docker ps -qa) && docker rmi -f $(docker images -qa) && docker volume rm $(docker volume ls -q) && docker network rm $(docker network ls -q)

Описание команд

╭─── Claude Code v2.1.12 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │ Tips for getting started │
│ Welcome back Jonny! │ Run /init to create a CLAUDE.md file with instructions for Claude │
│ │ │
│ │ ───────────────────────────────────────────────────────────────── │
│ ▐▛███▜▌ │ Recent activity
@phpclub
phpclub / skill-activation-hook.md
Created February 17, 2026 07:54 — forked from umputun/skill-activation-hook.md
Mandatory Skill Activation Hook for Claude Code

Mandatory Skill Activation Hook for Claude Code

Forces Claude to evaluate and activate relevant skills before implementation. By default, Claude Code often ignores available skills entirely and proceeds with generic responses instead of leveraging specialized skill knowledge.

Problem Solved

Claude Code frequently skips skill evaluation and jumps straight to implementation, missing out on specialized context and workflows that skills provide. This hook injects a system reminder on every prompt submission that enforces a three-step sequence: evaluate → activate → implement.

Files Required

@phpclub
phpclub / settings.json
Created February 17, 2026 07:55 — forked from pavelkorolevxyz/settings.json
Хук и скрипт для активации скиллов в Claude Code (без него они работают крайне рандомно)
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/skill-activation.sh"
}
@phpclub
phpclub / php85-allocator-bench.md
Created May 27, 2026 14:37 — forked from andypost/php85-allocator-bench.md
profiling PHP 8.5 with memory allocators on Alpinelinux

Memory allocators on Alpine Linux — PHP & multi-threaded servers

Measured 2026-05-07 to 2026-05-08 on Alpine edge, x86_64, 8 cores, 14 GB RAM. PHP 8.5.6, opcache always on. Drupal 11.x-dev (7 455 vendor .php, 8 499 classes) as the realistic single-threaded workload. A small C harness (8 pthreads × 2 000 000 small mallocs) for the multi-threaded contention scenario.

11 allocators tested:

| Allocator | Version | Source |