$ brew install git dnsmasq mariadb nginx redis
$ brew install node npm nvm
$ brew install bat zsh zsh-syntax-highlighting
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
name: Code Style & Static Analysis | |
on: | |
push: | |
branches: | |
- develop | |
- feature/* | |
workflow_dispatch: | |
jobs: |
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\Http\Controllers\Subdomains\Api; | |
use App\Http\Controllers\Subdomains\Api\Controller; | |
use App\Http\Requests\Api\Blog\StoreRequest; | |
use App\Http\Requests\Api\Blog\UpdateRequest; | |
use App\Http\Resources\Blog\Post as Resource; | |
use App\Http\Resources\Blog\Posts as Collection; | |
use App\Models\Blog\Post; |
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); | |
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector; | |
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; | |
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; | |
use Rector\Config\RectorConfig; | |
use Rector\Php81\Rector\Array_\FirstClassCallableRector; | |
use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector; |
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
for (const [name, filter] of Object.entries(filters)) { | |
if (['getDescription', 'getRSSlink'].includes(name)) { | |
eleventyConfig.addAsyncFilter(name, filter) | |
} else { | |
eleventyConfig.addFilter(name, filter) | |
} | |
} |
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\Models; | |
use App\Models\Base as Model; | |
use App\Support\Str; | |
use App\Support\Stringable; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Facades\Storage; | |
use Spatie\YamlFrontMatter\YamlFrontMatter; |
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\Console\Commands\Link; | |
use App\Models\Link\Link; | |
use App\Support\Str; | |
use GuzzleHttp\Exception\RequestException; | |
use Illuminate\Console\Command; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Http\Client\ConnectionException; |
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\Http\Middleware; | |
use App\Services\ReplayRequest; | |
use Closure; | |
use Illuminate\Http\Request; | |
class PostSpecificReplay | |
{ |
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
const TextToSVG = require('text-to-svg') | |
const textToSVG = TextToSVG.loadSync('fonts/Inter.woff') | |
const colours = Object.values({ | |
blue: '#2490BA', | |
pink: '#d60058', | |
purple: '#5f01ad', | |
green: '#048242', | |
orange: '#e87204' | |
}).reverse() |
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 | |
// Property::query()->nearest($property)->limit(5)->get(); | |
// $property->nearest()->limit(5)->get(); | |
public function scopeNearest(Builder $query, ?Property $property = null): Builder | |
{ | |
$property = $property ?? $this; | |
$earthRadius = 3959; | |
$latitude = $property->address->lat; |
NewerOlder