Skip to content

Instantly share code, notes, and snippets.

View marcorieser's full-sized avatar

Marco Rieser marcorieser

View GitHub Profile
@aaronbushnell
aaronbushnell / AssetImport.php
Last active October 15, 2025 10:24
A helper class to create Statamic assets out of URLs. Uses intervention/image for compression and resizing
<?php
namespace App\Helpers;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManagerStatic as Image;
use Statamic\Contracts\Assets\AssetContainer;
use Statamic\Facades\Asset;
@marcorieser
marcorieser / Setup PhpStorm to use Prettier and Laravel Pint (Antlers, Blade, PHP, Tailwind, Statamic).md
Last active October 16, 2025 13:18
Setup PhpStorm to use Prettier and Laravel Pint (Antlers, Blade, PHP, Tailwind, Statamic)

Install dependencies

Run npm install -D prettier prettier-plugin-antlers prettier-plugin-blade prettier-plugin-tailwindcss in your terminal

Prettier

Configure prettier

Create a .prettierrc file with the following content

{
    "singleQuote": true,
    "printWidth": 140,
@jasonvarga
jasonvarga / LocalValetDriver.php
Created June 19, 2021 02:43
Valet Driver that supports Statamic 3's static caching
<?php
class LocalValetDriver extends LaravelValetDriver
{
public function frontControllerPath($sitePath, $siteName, $uri)
{
if ($this->isActualFile($staticPath = $this->getStaticPath($sitePath))) {
return $staticPath;
}
@bgarrant
bgarrant / How-to-setup-PHPStorm-for-Statamic-Antlers.md
Last active June 25, 2025 11:36
How to setup PHPStorm for Statamic Antlers

How to setup PHPStorm for Statamic Antlers

If any PHPStorm users want better syntax coloring for Antlers I figured out a better way.

  1. Install Handlebars/Mustache plugin and enable the checkbox for “Open HTML files as Handlebars/Mustache” under Languages & Frameworks > JavaScript > Templates. Not perfect but much, much better!

  2. This makes it even better. Disable Inspection and Syntax for Handlebars by click on Hector icon and changing the Highlighting Level for Handlebars to "None". Now no inspection errors!

  3. Enjoy Statamic Antlers inside .html files in PHPStorm.

cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove