Türker Yıldırım
Writing
Snippets
About
Search
Snippets
One-liners, regexes and short scripts worth keeping. Copy, adapt, move on.
Find the largest autoloaded options
mysql
performance
profiling
wordpress
Wait for a compose service to be healthy before running tests
bash
ci-cd
docker
docker-compose
testing
A PHPStan baseline that can only shrink
ci-cd
phpstan
refactoring
static-analysis
testing
Alert on an error budget burn rate
logging
monitoring
performance
system-design
Run a Postman collection in CI with Newman
api-design
ci-cd
integration-testing
postman
Measure replication lag with a heartbeat table
architecture
monitoring
mysql
sql
Validate a request against an OpenAPI schema
api-design
openapi
php
testing
Cache Composer in a GitHub Actions workflow
ci-cd
composer
github-actions
performance
Create a Redis ACL user for one service
caching
deployment
redis
security
Generate a PHPStan baseline and fail on growth
bash
ci-cd
phpstan
static-analysis
Restore last night’s dump and assert on row counts
backup
bash
monitoring
mysql
Find indexes that have never been read
indexing
monitoring
mysql
sql
A debounced value as a React hook
async
javascript
performance
react
Verify a webhook signature in constant time
deployment
gitlab-ci
php
security
Pass a build secret without baking it into a layer
ci-cd
deployment
docker
security
Mount a Composer cache in a BuildKit build
ci-cd
composer
docker
performance
Reindex behind an alias with no downtime
bash
deployment
elasticsearch
migrations
Make an index invisible to test a drop
indexing
migrations
mysql
sql
Check every hostname in a file for a near-expiry certificate
bash
monitoring
security
tls
A content security policy header for a site with no inline script
deployment
nginx
security
tls
Wait for a TCP port before starting a container command
bash
deployment
docker
docker-compose
Count queries per request in Laravel middleware
laravel
php
profiling
query-optimization
Build a PHP image with only the extensions you need
deployment
docker
performance
php
Read a Symfony parameter without injecting the container
design-patterns
oop
php
symfony
Alert when a certificate is under thirty days
bash
monitoring
security
tls
Register a Gutenberg block from PHP
gutenberg
php
wordpress
wp-plugins
Debounce without a library
async
javascript
linting
performance
Fail a build when PHPStan finds a new error
bash
ci-cd
phpstan
static-analysis
A grid that wraps without a media query
bootstrap
css
html
performance
Walk a category tree with a recursive CTE
migrations
mysql
query-optimization
sql
Retry an HTTP call with exponential backoff in PHP
api-design
async
monitoring
php
Issue a wildcard certificate with a DNS challenge
bash
deployment
security
tls
Claim a queue row without two workers taking it
async
mysql
queues
sql
Rank rows within a group in one query
indexing
mysql
query-optimization
sql
Delete Elasticsearch indices older than 30 days
backup
bash
elasticsearch
logging
Format bytes as a human readable size in PHP
linting
oop
php
refactoring
A responsive grid with no media queries
bootstrap
css
html
performance
Check a TLS certificate chain from the command line
bash
monitoring
security
tls
Find the biggest key in Redis by memory
bash
monitoring
performance
redis
Find which systemd unit owns a process
bash
linux
logging
monitoring
1
2
3
…
6
Older