Run npm install -D prettier prettier-plugin-antlers prettier-plugin-blade prettier-plugin-tailwindcss in your terminal
Create a .prettierrc file with the following content
{
"singleQuote": true,
"printWidth": 140,| <?php | |
| use PhpCsFixer\Config; | |
| use PhpCsFixer\Finder; | |
| $rules = [ | |
| 'array_syntax' => ['syntax' => 'short'], | |
| 'no_unused_imports' => true, | |
| 'blank_line_after_namespace' => true, |
| <?php | |
| /* | |
| A simple PHP class to perform basic operations against Amazon S3 and compatible | |
| services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules. | |
| Copyright 2022 Marco Arment. Released under the MIT license: | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights |
| <?php | |
| // needs picqer/php-barcode-generator | |
| $generator = new \Picqer\Barcode\BarcodeGeneratorPNG(); | |
| $barcode = $generator->getBarcode($data, $generator::TYPE_CODE_128, 3, 100, [0,0,0]); | |
| // ensure the char count is even for CODE_128_C | |
| $barcodeData = (strlen($data) % 2) === 0 ? $data : '0' . $data; | |
| $generator = new \Picqer\Barcode\BarcodeGeneratorPNG(); |
| // Core assets | |
| let coreAssets = []; | |
| // On install, cache core assets | |
| self.addEventListener('install', function (event) { | |
| // Cache core assets | |
| event.waitUntil(caches.open('app').then(function (cache) { | |
| for (let asset of coreAssets) { | |
| cache.add(new Request(asset)); |
| <?php | |
| Auth::provider('sanctum:token', function ($app, $config) { | |
| return new SanctumTokenUserProvider($app['hash'], $config['model']); | |
| }); |
| @props([ | |
| 'id' => 'autocomplete-'. uniqid(), | |
| 'placeholder' => 'Search...', | |
| 'indexName' => '', | |
| 'publicKey' => '', | |
| 'host' => 'http://127.0.0.1:7700', | |
| ]) | |
| <div | |
| x-data="{ |
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Request; | |
| class SignedOrLoggedIn | |
| { | |
| /** |
| <script data-turbo-eval="false"> | |
| document.addEventListener('turbo:before-render', () => { | |
| let permanents = document.querySelectorAll('[data-turbo-permanent]') | |
| let undos = Array.from(permanents).map(el => { | |
| el._x_ignore = true | |
| return () => { | |
| delete el._x_ignore | |
| } |
| exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileCreateDate<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json . |