Skip to content

Instantly share code, notes, and snippets.

View inventor96's full-sized avatar
🏗️
Building the systems that features run on.

Caleb Hornbeck inventor96

🏗️
Building the systems that features run on.
View GitHub Profile
@inventor96
inventor96 / fix_unquoted_array_keys.php
Last active April 23, 2024 20:16
Recursively finds and fixes unquoted array keys in PHP. This is not full-proof, nor does it cover 100% of all occurrences, but it gets really close at getting nearly all of them. See the respective sources for discussion and limitations of each function.
#!/usr/bin/php
<?php
/**
* Run this script on the command line like `php fix_unquoted_array_keys.php './*.php'`
* Or make the file executable and run it directly.
*
* As the first argument after the script name gets passed directly to `rglob()`, it's
* recommended that you quote it to prevent the shell from doing the expansion itself.
*/
@inventor96
inventor96 / Example.php
Created July 30, 2026 00:17
Auto-load Mako cron commands for use with crunz
<?php
/*
* app/console/commands/crons/Example.php
*/
namespace app\console\commands\crons;
use app\console\crunz\ScheduleInterface;
use Crunz\Event;
use mako\reactor\attributes\CommandDescription;