# Mohammad Abu Mattar, Full Content Bundle > Full text of the professional core pages and all case studies, then a link index to every content section. For the exhaustive list of Markdown twins, see /llms-sitemap.txt. --- # Mohammad Abu Mattar --- # Content sections # blog 0 entries. # case-studies 0 entries. # cheatsheets 0 entries. # Code Snippets 18 entries. - [Bash Script Locking: Prevent Concurrent Runs with a PID File](https://mkabumattar.com/codesnippets/post/bash-script-locking-pid-file), A Bash snippet that uses a PID file so only one instance of a script runs at a time. Essential for cron jobs and automation scripts that must not overlap. Includes stale lock detection and cleanup on exit. - [AWS DynamoDB CRUD Operations in Node.js with the AWS SDK v3](https://mkabumattar.com/codesnippets/post/nodejs-dynamodb-crud-aws-sdk-v3), A practical Node.js snippet covering DynamoDB put, get, update, delete, and query operations using the modern AWS SDK v3. Includes the DocumentClient pattern, single-table design basics, and error handling. - [Python Async HTTP Requests with aiohttp: Fetch Multiple URLs Concurrently](https://mkabumattar.com/codesnippets/post/python-async-http-aiohttp-concurrent-requests), A Python snippet demonstrating concurrent HTTP requests using aiohttp and asyncio. Covers creating sessions, fetching multiple URLs in parallel, handling errors gracefully, and controlling concurrency with semaphores. - [Bash Retry Function: Automatically Retry Failing Commands with Exponential Backoff](https://mkabumattar.com/codesnippets/post/bash-retry-function-exponential-backoff), A reusable Bash function that retries any failing command with configurable attempts and exponential backoff. Ideal for wrapping flaky network calls, AWS CLI commands, or deployment scripts in CI/CD pipelines. - [Node.js Environment Variable Validation with Zod at Startup](https://mkabumattar.com/codesnippets/post/nodejs-env-validation-zod-startup), Stop trusting process.env blindly. This Node.js and TypeScript snippet validates every environment variable at startup with a Zod schema, coerces strings into real types, and refuses to boot on bad config so you catch mistakes before a single request is served. - [AWS EC2 Instance Management with Boto3: Start, Stop, and Query Instances](https://mkabumattar.com/codesnippets/post/aws-ec2-instance-management-boto3-python), Learn how to automate AWS EC2 instance management using Python and Boto3. This guide covers authentication with IAM roles, starting and stopping instances, using waiters, filtering by tags, running bulk operations, and handling API errors. Practical code examples included for DevOps engineers and cloud developers - [Redis Caching Patterns: Cache-Aside, Write-Through & Cache Invalidation](https://mkabumattar.com/codesnippets/post/redis-caching-patterns-architecture), Master production-ready Redis caching patterns with practical examples. Learn cache-aside (lazy loading), write-through, consistency patterns, TTL strategies, and cache invalidation techniques to reduce database load and improve application performance. - [PostgreSQL Query Optimization: Indexes, EXPLAIN ANALYZE & Execution Plans](https://mkabumattar.com/codesnippets/post/postgresql-query-optimization-indexes-explain), Master PostgreSQL query optimization with practical examples. Learn EXPLAIN ANALYZE interpretation, effective index strategies, query rewriting, and connection pooling to identify and fix slow queries in production microservices. - [Multi-Environment Secret Management with HashiCorp Vault](https://mkabumattar.com/codesnippets/post/hashicorp-vault-multi-environment-secrets), Manage secrets securely across dev, staging, and production with HashiCorp Vault. This snippet demonstrates dynamic secret generation, rotation, and cross-environment secret syncing patterns. - [Top 7 Open Source OCR Models for Document Processing](https://mkabumattar.com/codesnippets/post/top-7-open-source-ocr-models), The best open source OCR models for converting documents, images, and PDFs to text. Compare olmOCR, PaddleOCR, OCRFlux, and more, with performance benchmarks and implementation examples. - [Why printf Beats echo in Linux Scripts](https://mkabumattar.com/codesnippets/post/printf-beats-echo-linux-scripts), Why printf is more reliable than echo for output in Linux scripts. The portability problems with echo, what printf gives you instead, and when each command is the right choice. - [Essential Bash Variables for Every Script](https://mkabumattar.com/codesnippets/post/essential-bash-variables), Master the most useful Bash special parameters and environment variables. Learn how to use $0, $?, $@, $UID, $EUID, and XDG variables to write more reliable and portable scripts. - [Per-App Shell History for Zsh](https://mkabumattar.com/codesnippets/post/zsh-per-app-history), Keep your Zsh history organized across different terminal applications. This snippet automatically creates separate history files for each terminal emulator you use. - [Per-App Shell History for Bash](https://mkabumattar.com/codesnippets/post/bash-per-app-history), Keep your Bash history organized across different terminal applications. This snippet automatically creates separate history files for each terminal emulator you use. - [Optimizing your python code with __slots__?](https://mkabumattar.com/codesnippets/post/python-slots-optimization), Discover how Python `__slots__` can reduce memory usage by up to 40% in data-heavy applications. Perfect for MLOps pipelines and big data processing where millions of objects consume precious memory resources. - [List S3 Buckets](https://mkabumattar.com/codesnippets/post/python-list-s3-buckets), Automate AWS S3 interactions. This Python snippet uses Boto3 to easily list all S3 buckets in your account. - [AWS Secrets Manager](https://mkabumattar.com/codesnippets/post/nodejs-aws-secrets-manager), Access secrets securely in your Node.js apps. This snippet demonstrates fetching sensitive data from AWS Secrets Manager. - [Check S3 Bucket Existence](https://mkabumattar.com/codesnippets/post/bash-s3-bucket-exists), Validate AWS S3 bucket presence in your scripts. This Bash snippet checks if a bucket exists before proceeding with operations. # devtips 0 entries. # flashcards 0 entries. # glossary 0 entries. # quizzes 0 entries. # roadmaps 0 entries. # Series 14 series. - [AI & LLM Engineering](https://mkabumattar.com/series/ai--llm-engineering), 1 post (Codesnippets) - [AWS Automation](https://mkabumattar.com/series/aws-automation), 4 posts (Codesnippets) - [Bash Snippets](https://mkabumattar.com/series/bash-snippets), 1 post (Codesnippets) - [Database Optimization](https://mkabumattar.com/series/database-optimization), 1 post (Codesnippets) - [Linux & System Administration](https://mkabumattar.com/series/linux--system-administration), 1 post (Codesnippets) - [Linux Essentials](https://mkabumattar.com/series/linux-essentials), 1 post (Codesnippets) - [Node.js Backend Essentials](https://mkabumattar.com/series/nodejs-backend-essentials), 1 post (Codesnippets) - [Node.js Snippets](https://mkabumattar.com/series/nodejs-snippets), 1 post (Codesnippets) - [Performance & Scaling](https://mkabumattar.com/series/performance--scaling), 1 post (Codesnippets) - [Programming Languages](https://mkabumattar.com/series/programming-languages), 1 post (Codesnippets) - [Python Snippets](https://mkabumattar.com/series/python-snippets), 1 post (Codesnippets) - [Secret Management](https://mkabumattar.com/series/secret-management), 1 post (Codesnippets) - [Shell & Terminal Productivity](https://mkabumattar.com/series/shell--terminal-productivity), 1 post (Codesnippets) - [Shell Mastery](https://mkabumattar.com/series/shell-mastery), 2 posts (Codesnippets)