Skip to content

Instantly share code, notes, and snippets.

View vamuigua's full-sized avatar
💠
KAIZEN 💯

Victor Allen vamuigua

💠
KAIZEN 💯
View GitHub Profile
@vamuigua
vamuigua / Assert-Pagination.md
Created May 10, 2023 12:35 — forked from dillingham/Assert-Pagination.md
Assert Laravel Pagination - Add helper to Testcase.php
public function assertHasPagination($response, $values = [])
{
    $response->assertJsonStructure([
        'links' => [
            'first',
            'last',
            'prev',
            'next',
 ]
@vamuigua
vamuigua / repair-mysql-data.ps1
Created May 28, 2024 08:05 — forked from josemmo/repair-mysql-data.ps1
Repair MySQL data directory (for XAMPP)
# Based on this answer: https://stackoverflow.com/a/61859561/1956278
# Backup old data
Rename-Item -Path "./data" -NewName "./data_old"
# Create new data directory
Copy-Item -Path "./backup" -Destination "./data" -Recurse
Remove-Item "./data/test" -Recurse
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse
@vamuigua
vamuigua / Setup a custom pre-commit script for a Laravel Project.md
Last active August 26, 2024 09:02
Setup a custom pre-commit script for a Laravel Project

Setup a custom pre-commit script for a Laravel Project

Here's how you can set it up:

  1. First, make sure your pre-commit file is in the correct location. It should be in the .git/hooks/ directory of your project. If it's not there already, move it:
mv pre-commit .git/hooks/pre-commit