Skip to content

Instantly share code, notes, and snippets.

View michabbb's full-sized avatar
💯
Need help ? Call me.....

Micha(el) Bladowski michabbb

💯
Need help ? Call me.....
View GitHub Profile
@michabbb
michabbb / php-fpm-slow-pool-gist.md
Last active May 5, 2026 23:41
PHP-FPM: route a long-running endpoint into a separate pool — without touching application code. Setup with nginx map + dedicated FPM pool.

PHP-FPM: Route a long-running endpoint into a separate pool — without touching application code

Problem

PHP-FPM has three different timeouts that can kill a request:

Layer Directive Overridable per-request from PHP?
nginx fastcgi_read_timeout ❌ No (the connection is dropped on the nginx side)
PHP max_execution_time (php.ini) ✅ Yes, via set_time_limit() / ini_set()
@michabbb
michabbb / gist_README.md
Last active January 23, 2026 19:06
MedGemma MRI Analysis Script - An experiment in AI medical imaging (spoiler: it doesn't work well)

MedGemma MRI Analysis Script

A Python script for analyzing MRI DICOM images using Google's MedGemma model via Vertex AI.

DISCLAIMER: This is for educational/experimental purposes only. NEVER rely on AI for medical diagnosis!

What This Does

  • Sends batches of DICOM images to MedGemma for analysis
  • Handles the tricky Vertex AI endpoint configuration
@michabbb
michabbb / check_pve_backup_gist.sh
Created January 22, 2026 01:53
Nagios/Icinga plugin to monitor Proxmox VE (vzdump) backup status via the Proxmox API. Supports checking specific VMs, all running VMs, or any recent backup. Works with both single-VM and batch backup jobs.
#!/bin/bash
#
# check_pve_backup - Nagios/Icinga plugin for Proxmox VE backup monitoring
#
# Monitors vzdump backup status via the Proxmox API (pvesh).
# Supports checking specific VMs, all running VMs, or any recent backup.
#
# Requirements:
# - Must run on a Proxmox VE host (needs pvesh command)
# - jq for JSON parsing
@michabbb
michabbb / README.md
Last active February 2, 2026 07:31
OpenCode CLI Plugin: Audio Permission Notifications

Building an OpenCode CLI Plugin for Audio Permission Notifications

Overview

This guide shows how to create an OpenCode CLI plugin that plays an audio notification when OpenCode needs user permissions. The solution consists of two components:

  1. A shell script to play system audio
  2. An OpenCode plugin that listens for the permission.asked event

@michabbb
michabbb / llm-code-optimization-battle.md
Created November 19, 2025 11:39
The Great LLM Code Optimization Battle: 8 AI Models, 1 Function - php 7.4 (gemini 3, minimax m2, grok 4.1, gpt 5.1 high, kimi k2 thinking)

The Great LLM Code Optimization Battle: 8 AI Models, 1 Function

The Challenge

What happens when you pit the world's most advanced AI models against each other in a code optimization challenge? I decided to find out by asking 8 different large language models to optimize a single PHP function - and the results were fascinating, surprising, and sometimes hilariously broken.

The prompt was simple and identical for all contestants:

"optimize this code: php 7.4"

@michabbb
michabbb / ssh-post-quantum-guide.md
Created November 15, 2025 18:31
SSH Post-Quantum Cryptography Configuration Guide - How to enable post-quantum key exchange and suppress OpenSSH warnings

SSH Post-Quantum Cryptography Configuration Guide

This guide explains how to configure SSH to use post-quantum cryptography and suppress related warnings.

Understanding the Warning

When connecting via SSH, you might see:

** WARNING: connection is not using a post-quantum key exchange algorithm.
** This session may be vulnerable to "store now, decrypt later" attacks.
@michabbb
michabbb / fictional_city_tour_planned_with_google_maps_mcp.md
Created September 26, 2025 16:14
fictional city tour planned with google maps mcp
URBAN_WANDER_11_NOV_2025 {
  
  PHASE_1 "Morning Setup & Breakfast" {
    TIME: "07:30-09:30"
    
    PARKING {
      NAME: "Northgate Parkhouse"
      ADDRESS: "Northgate Square 3, 10001 Sample City"
      COORDINATES: "00.100000, 00.200000"
@michabbb
michabbb / coderabbit-install.sh
Last active September 25, 2025 20:44
fixed coderabbits install script, because they are great in checking code from others, but not testing their own stuff ;-)
#!/bin/sh
# CodeRabbit CLI Installation Script
#
# This script downloads and installs the CodeRabbit CLI to ~/.local/bin
# It automatically detects your platform (OS/architecture) and downloads the appropriate binary.
#
# USAGE:
# # Install latest version
# curl -fsSL https://cli.coderabbit.ai/install.sh | sh
@michabbb
michabbb / formatting_php_code_with_claude_code.md
Created September 9, 2025 09:43
formatting_php_code_with_claude_code

.php-cs-fixer.php

<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$rules = [
    'binary_operator_spaces'             => [
Type Description
blog This official guide from Anthropic provides tips for customizing your setup, giving Claude more tools, and common workflows for using Claude Code.
blog A Reddit discussion on the various non-coding uses of Claude Code, such as for SEO, marketing, recruiting, and product strategy.
blog This article outlines three best practices for using Claude Code to transform product development: mastering project context with claude.md files, structuring autonomous workflows, and creating design-to-code pipelines.
blog A case study on how different teams at Anthropic use Claude Code for tasks like codebase navigation, testing, debugging, prototyping, documentation, and automation.
[blog](h