This file contains hidden or 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 | |
| /* | |
| * NOTES: | |
| * | |
| * - This was designed for my personal use and could be more robust. | |
| * - Make sure to update the tables you want to import into. | |
| * - Make sure to update the website url you want to import from. | |
| * - Customize as needed. I had very few posts and no media. | |
| * | |
| */ |
This file contains hidden or 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
| # SETUP # | |
| DOMAIN=example.com | |
| PROJECT_REPO="git@github.com:example.com/app.git" | |
| AMOUNT_KEEP_RELEASES=5 | |
| RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S) | |
| RELEASES_DIRECTORY=~/$DOMAIN/releases | |
| DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME | |
| # stop script on error signal (-e) and undefined variables (-u) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) { |