# Interesting Blade in Markdown idea
How about something like this in Markdown?
<x-header image="media/my-image.png">
<x-slot name="title">
Lorem Ipsum
</x-slot>
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
| name: Build Laravel Vite assets for production | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: write |
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 | |
| for i in {1..25} | |
| do | |
| # Calculate the date in reverse order | |
| reversed_date="2024-01-01 12:$(printf "%02d" $((25 - i)))" | |
| # Create the file with the specified content | |
| echo "---" > "_posts/post-$i.md" | |
| echo "title: 'Post $i'" >> "_posts/post-$i.md" |
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
| for file in *.jpg *.jpeg *.png *.gif *.webp; do | |
| mv "$file" "$(md5sum "$file" | cut -d ' ' -f 1).${file##*.}" | |
| done |
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
| enum ImageSizes: string { | |
| case Square = '768x768'; | |
| case Portrait = '512x768'; | |
| case Landscape = '768x512'; | |
| /** @return array{width: int, height: int} */ | |
| public function toArray(): array { | |
| $size = explode('x', $this->value); | |
| return [ |
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 | |
| // Super crude pasted together single file script to run Adminer with SQLite | |
| class AdminerLoginSqlite { | |
| function login($login, $password) { | |
| return true; | |
| } |
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\Console\Commands; | |
| use App\Models\User; | |
| use Illuminate\Console\Command; | |
| class MakeUserCommand extends Command | |
| { | |
| protected $signature = 'make:user'; |
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 | |
| use App\Models\User; | |
| use Illuminate\Foundation\Testing\RefreshDatabase; | |
| uses(RefreshDatabase::class); | |
| test('stability', function ($url) { | |
| $this->get($url)->assertOk(); | |
| })->with(['/', '/about', '/terms-of-service']); |
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 | |
| /** | |
| * Format the number to a fluent human-readable string. | |
| * | |
| * @param int $number | |
| * @param int $precision | |
| * @return string | |
| */ | |
| public static function toHuman($number, $precision = 2) |