This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Action that will run prettier on the whole repo and commit the changes to the PR. | |
name: Prettier | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if ffmpeg is installed | |
if ! command -v ffmpeg &> /dev/null; then | |
echo "Error: ffmpeg is not installed or not in the PATH." >&2 | |
echo "Please install ffmpeg to use this script." >&2 | |
exit 1 | |
fi | |
interval=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Lazy Man's Saloon Fake | |
* | |
* This will record every request that you make in your application and store it in a folder | |
* based on the name of the test. This is incredibly powerful, but I wouldn't recommend it | |
* for every request if you are doing the same things over as it will waste API calls. | |
* | |
* @return void | |
*/ | |
function lazyFakeSaloon(): void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Livewire\Attributes; | |
use Attribute; | |
use Livewire\Features\SupportAttributes\Attribute as LivewireAttribute; | |
use function Livewire\store; | |
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Reading | |
CsvReader::read($path)->each(function(array $row) { | |
// Do something with $row | |
}); | |
// Writing | |
return CsvWriter::for($data)->writeToHttpFile(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Services; | |
use Exception; | |
use HeadlessChromium\BrowserFactory; | |
use HeadlessChromium\Page; | |
use HeadlessChromium\PageUtils\PagePdf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Support\Synthesizers; | |
use Spatie\LaravelData\Data; | |
use Livewire\Mechanisms\HandleComponents\Synthesizers\Synth; | |
class SpatieLaravelDataSynthesizer extends Synth | |
{ | |
public static string $key = 'spld'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PathMe { | |
moves: string[] = []; | |
constructor() { | |
this.moves = []; | |
return this; | |
} | |
moveTo(x: number, y: number) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Below is an the extended Filament resource your tenant panel resources | |
* will have to extend so that the queries are scoped properly. | |
*/ | |
namespace App\Filament; | |
use Filament\Resources\Resource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Enums; | |
enum State: string | |
{ | |
case ALABAMA = 'AL'; | |
case ALASKA = 'AK'; |
NewerOlder