Skip to content

Instantly share code, notes, and snippets.

View DarkGhostHunter's full-sized avatar

Italo DarkGhostHunter

View GitHub Profile
@DarkGhostHunter
DarkGhostHunter / plan-prompt.md
Last active August 22, 2026 06:04
Planning prompt for any software engineering task

Role: Principal Systems Architect Task: Generate an actionable, dependency-ordered technical specification and implementation plan for the described objective.

  1. Scope & Assumptions:
  • State the core objective, technology stack, and hard constraints.
  • Explicitly list any assumptions made regarding architecture, runtime environment, or external dependencies.
  • If critical technical requirements or environmental constraints are ambiguous, do not guess: halt and list up to 3 blocking questions before drafting the plan.
  1. Design Options & Trade-Offs (if applicable):
  • If multiple viable architectural patterns exist, compare the top 2–3 approaches detailing pro/cons: complexity, scalability, security, and maintenance costs. Highlight the recommended approach.
@DarkGhostHunter
DarkGhostHunter / foundation.blade.php
Last active August 10, 2026 02:17
Foundational AI Guidelines for Laravel Projects
@php
/** @var \Laravel\Boost\Install\GuidelineAssist $assist */
@endphp
# Laravel Development Guidelines
- You're expert on Laravel running on PHP {{ PHP_MAJOR_VERSION }}.{{ PHP_MINOR_VERSION }}).
- Verify exact dependency versions on your knowledge (`composer show --direct`, `composer show <vendor/package>`, or `package.json`). Do not assume versions, API signatures or alter dependencies without approval.
@if (! empty(config('boost.purpose')))
- Application purpose: {!! config('boost.purpose') !!}
@endif
@DarkGhostHunter
DarkGhostHunter / mago.toml
Created April 18, 2026 01:02
Mago configurationg for Laravel Projects
version = "1"
php-version = "8.5.0"
[source]
workspace = "."
paths = ["src/"]
includes = ["vendor/"]
excludes = []
[source.glob]
@DarkGhostHunter
DarkGhostHunter / update-nss-build.sh
Created November 18, 2025 05:07
Creates a full-features OpenWRT firmware for Dynalink DL-WRX36
#!/bin/bash
# Script to update jkool702's Quality build with AgustinLorenzo's NSS base
# Run from ~/openwrt directory in Distrobox (Debian stable)
#
# This was curated by using Claude AI. Source at:
# https://claude.ai/public/artifacts/7be7051b-b5d1-40d5-88d4-5603860fc2cf
set -e # Exit on error
# Check if this is a continuation of a previous build
@DarkGhostHunter
DarkGhostHunter / Caddyfile.development
Created August 27, 2025 19:38
Dockerfile for FrankenPHP on Laravel Sail for Development
:8108 {
reverse_proxy typesense:8108
}
@DarkGhostHunter
DarkGhostHunter / min_max_uuid.sql
Last active February 12, 2026 05:58
Adds MIN/MAX UUID compatibility to PostgreSQL
-- Create a function to compare MAX uuid
CREATE OR REPLACE FUNCTION uuid_max(uuid, uuid)
RETURNS uuid AS $$
SELECT GREATEST($1, $2);
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE;
-- Create a function to compare MIN uuid
CREATE OR REPLACE FUNCTION uuid_min(uuid, uuid)
RETURNS uuid AS $$
SELECT LEAST($1, $2);
@DarkGhostHunter
DarkGhostHunter / Repository.php
Created May 11, 2025 04:00
A cache repository for objects
<?php
namespace App\Repository;
use Closure;
use Illuminate\Contracts\Cache\Factory as CacheFactoryContract;
use Illuminate\Contracts\Cache\Repository as CacheRepository;
use InvalidArgumentException;
use function trim;
@DarkGhostHunter
DarkGhostHunter / sqlsrv_entrypoint.sh
Last active August 22, 2024 03:34
Entrypoint for the SQL Server Docker Compose Service
#!/usr/bin/env bash
# If there is a command, execute it.
if [ "$#" -ne 0 ]; then
exec "$@"
fi
SQLCMD="/opt/mssql-tools/bin/sqlcmd"
# If the container uses the latest Microsoft SQL tools, use that command instead.
@DarkGhostHunter
DarkGhostHunter / Seeder.php
Created January 22, 2024 19:40
Larawiz Seeder
<?php
namespace Database\Seeders;
use Closure;
use Illuminate\Console\View\Components\TwoColumnDetail;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Database\Query\Builder;
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Database\Eloquent\Factories\Factory;
@DarkGhostHunter
DarkGhostHunter / User.php
Last active April 30, 2026 00:52
Useful PHPDoc for your models (Copy & paste)
/**
* @mixin \Illuminate\Database\Eloquent\Builder<$this>
*
* @method \Illuminate\Database\Eloquent\Builder<$this>|static newQuery()
* @method static \Illuminate\Database\Eloquent\Builder<$this>|static query()
* @method static static make(array $attributes = [])
* @method static static create(array $attributes = [])
* @method static static forceCreate(array $attributes)
* @method static static forceCreateQuietly(array $attributes = [])
* @method static|null first($columns = ['*'], string ...$columns)