Skip to content

Instantly share code, notes, and snippets.

View a-h-abid's full-sized avatar
🕹️
... Codeting ....

Ahmedul Haque Abid a-h-abid

🕹️
... Codeting ....
View GitHub Profile
@a-h-abid
a-h-abid / preload.php
Created February 4, 2026 19:31
Preload script for Laravel application. Made based on version 12. Generated with help from Claude AI.
<?php
/**
* Laravel Framework Preloader
*
* Preloads Laravel framework files for improved performance.
* Uses a custom class map loader to avoid triggering Composer's autoload files
* which can contain anonymous classes that cause preload warnings.
*
* Place this file in your project root and configure in php.ini:
* opcache.preload=/path/to/your/project/preload.php
@a-h-abid
a-h-abid / .dockerignore
Created February 2, 2026 04:42
PHPFPM Docker Distroless
# Version control
.git
.gitignore
.gitattributes
# IDE and editor files
.idea
.vscode
.vs
*.swp
@a-h-abid
a-h-abid / planning.chatmode.md
Last active June 14, 2025 17:39
My Own Custom VSCode Chat Mode files that I will use in my projects. Files are to be stored in .github/chatmodes/
description tools
Generate an implementation plan in markdown for new features or refactoring existing code and prepare tasks, subtasks.
changes
codebase
editFiles
fetch
findTestFiles
githubRepo
insertEdit
runCommands
search
usages

Planning Mode Instructions

You are in planning mode. Your task is to generate a comprehensive implementation plan in markdown format for new features or refactoring existing code, breaking down the work into actionable tasks and subtasks.

Important Guidelines

@a-h-abid
a-h-abid / nginx-v1.17.6.Dockerfile
Last active October 28, 2025 13:17
Nginx v1.17.6 modules building for CentOS / RHEL 6
FROM centos:6.10
# Update to use vault repositories since CentOS 6 is EOL
RUN sed -i 's|mirrorlist=http://mirrorlist.centos.org|#mirrorlist=http://mirrorlist.centos.org|g' /etc/yum.repos.d/CentOS-Base.repo && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Base.repo
# Clean and update yum
RUN yum clean all && yum -y update
# Install build dependencies
@a-h-abid
a-h-abid / all-dir-git.sh
Last active September 26, 2024 16:48
Traverse across all directories in current path (excluding mentions) and run specified git command.
#!/usr/bin/env bash
# set -x
# Check if any arguments are passed
if [[ $# -eq 0 ]]; then
echo "No git commands provided."
exit 1
fi
@a-h-abid
a-h-abid / ubuntu-postinstall-scripts.txt
Last active February 4, 2026 14:55
New Ubuntu Post-Installation Command
# Apt Updates & Upgrades
sudo apt update
sudo apt upgrade -y
# Apt Installs
sudo apt install -y tlp apt-transport-https ca-certificates curl gpg zip unzip make chrome-gnome-shell
# Local Bin Dir
mkdir -p ~/.local/bin/
@a-h-abid
a-h-abid / AppExceptionHandler.php
Created October 13, 2023 18:44
Laravel 10+ Validator Response with Rule Names
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Validation\ValidationException;
class Handler extends ExceptionHandler
{
// ...
@a-h-abid
a-h-abid / DropAllTablesState.php
Created April 8, 2022 06:00
refresh module db
<?php
namespace Tests\Database;
class DropAllTablesState
{
/**
* Indicates if all tables have been dropped
*
* @var bool
@a-h-abid
a-h-abid / ScheduleListCommand.php
Last active February 14, 2022 18:27
To get scheduled tasks in system. Tested in Laravel 6+.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Console\Scheduling\Schedule;
class ScheduleListCommand extends Command
{
/**