Skip to content

Instantly share code, notes, and snippets.

View Maxiviper117's full-sized avatar
🚧
Building

David Maxiviper117

🚧
Building
View GitHub Profile
@Maxiviper117
Maxiviper117 / caddy-https.md
Last active July 16, 2025 12:17
Caddy WSL HTTPS Setup Docker

1. Installing mkcert on Windows

According to the official mkcert README, the simplest way on Windows is via Chocolatey:

choco install mkcert -y
mkcert -install

This will download the mkcert.exe installer, create a local CA, and add it to the Windows trust stores.

@Maxiviper117
Maxiviper117 / nuke-php.sh
Created July 14, 2025 11:06
Remove PHP 8.4 and composer form linux
#!/usr/bin/env bash
set -euo pipefail
echo "==> Stopping any running PHP services ..."
for svc in $(systemctl list-units --type=service --all --no-legend | awk '/php.*fpm/ {print $1}'); do
sudo systemctl stop "$svc" || true
done
echo "==> Building package list ..."
mapfile -t php_pkgs < <(dpkg -l | awk '/^ii.*php/ {print $2}')
@Maxiviper117
Maxiviper117 / 4.1-git-commiter.md
Last active July 9, 2025 18:13
4.1 Lazy Man Git V1
description tools
Git Commit Agent v1
changes
codebase
githubRepo
runCommands
search
searchResults
terminalLastCommand
terminalSelection

You are a Git Commit Agent. Your job is to:

  1. Inspect the current working directory’s uncommitted changes by calling the changes tool.
  2. Based on the diff output, stage relevant files and craft clear, concise commit messages using the Conventional Commits format.
  3. Use the terminal tool to run the appropriate git commands (git add, git commit) to record those changes.
@Maxiviper117
Maxiviper117 / MakeActionCommand.php
Last active July 9, 2025 09:31
Laravel Artisan Command for creating Actions
<?php
// app/Console/Commmands/MakeActionCommand.php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
@Maxiviper117
Maxiviper117 / 4.1.chatmode.md
Created July 3, 2025 14:17
Copilot chat: 4.1 Issue Detective
description
Code Issue Investigator (Analysis & Reporting Only)

You are a Code Issue Investigator agent—your mission is to autonomously diagnose and analyze any code problem the user describes, using all available tools, but without making any code edits. Instead, you will investigate, identify issues, and report potential solutions or next steps.

Continue iterating until you have a clear, thorough diagnostic report addressing the root cause, then summarize your findings. Do not apply fixes—only analyze and recommend.

Workflow

@Maxiviper117
Maxiviper117 / 4.1.chatmode.md
Created July 2, 2025 19:04
VSCode Copilot chatmode: Code Issue Investigator (Analysis & Reporting Only) for 4.1
description
Code Issue Investigator (Analysis & Reporting Only)

You are a Code Issue Investigator agent—your mission is to autonomously diagnose and analyze any code problem the user describes, using all available tools, but without making any code edits. Instead, you will investigate, identify issues, and report potential solutions or next steps.

Continue iterating until you have a clear, thorough diagnostic report addressing the root cause, then summarize your findings. Do not apply fixes—only analyze and recommend.

Workflow

@Maxiviper117
Maxiviper117 / php.json
Last active June 12, 2025 09:51
VSCode php snippets
{
"PHP Public Function": {
"prefix": "p-func-public",
"body": [
"public function ${1:functionName}(${2:parameters})",
"{",
"\t${3:// function body}",
"}"
],
"description": "Create a public function"
@Maxiviper117
Maxiviper117 / Microsoft.Powershell_profile.ps1
Created June 2, 2025 09:17
PowerShell profile snippet that loads an array of environment-variable paths into $env:PATH, warning if any are undefined.
# List the NAMES of the environment variables you want to pick up
$envVarNames = @(
'PHP83',
'PHP84',
'NODEJS_HOME'
)
# Wrap the existing PATH once for a fast “contains” check
$wrappedPath = ';' + ($env:PATH.TrimEnd(';')) + ';'
@Maxiviper117
Maxiviper117 / laravel-blade-organization.md
Created May 8, 2025 18:38
A concise guide to structuring Laravel Blade views with layouts, partials, and components.

Laravel Blade Organization Patterns

1. Layout Inheritance

resources/views/layouts/app.blade.php

<!doctype html>
<html>
 
@Maxiviper117
Maxiviper117 / Dockerfile
Last active April 10, 2025 19:09
Laravel 12 Dockerfile - Docker Compose Setup
FROM php:8.4.5-fpm
# Update package list and install dependencies
RUN apt-get update && apt-get install -y \
#-- Needed only for compiling native PHP extensions
build-essential \
#-- Required for gd extension
libpng-dev \
#-- Required for gd extension
libjpeg-dev \