Skip to content

Instantly share code, notes, and snippets.

View phpclub's full-sized avatar

Alexandr Smirnov phpclub

View GitHub Profile
@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 / 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

╭─── 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 / 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)

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

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 / 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
@phpclub
phpclub / angie.md
Created July 2, 2025 06:41 — forked from llcawc/angie.md
Настройка сервера Angie для Ubuntu или Debian

Настройка сервера Angie

Angie (Энджи) — эффективный, мощный и масштабируемый веб-сервер, реализованный как форк nginx:

  • Создан бывшими разработчиками исходного проекта, чтобы двигаться в новом направлении, и может служить заменой предшественнику без переработки конфигурации и модулей.
  • Включает все возможности nginx 1.27.4 и добавляет к ним целый ряд новых функций.

Установка Angie на сервер Ubuntu или Debian

На основе официальной документации: https://angie.software/angie/docs/installation/

<?php
define('_JEXEC', 1);
// Connect with Joomla
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
require_once JPATH_BASE . '/includes/framework.php';
// Database connection
$db = JFactory::getDBO();
# Add Repository to your system (ondrej/php PPA)
sudo apt install apt-transport-https lsb-release ca-certificates
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
# Install PHP 7.1
sudo apt install php7.1
@phpclub
phpclub / phpstan-install.sh
Created June 14, 2024 03:33 — forked from fedir/phpstan-install.sh
phpstan install globally as phar
wget -O phpstan.phar https://github.com/phpstan/phpstan/raw/HEAD/phpstan.phar
chmod a+x phpstan.phar
sudo mv phpstan.phar /usr/local/bin/phpstan
phpstan