Skip to content

Instantly share code, notes, and snippets.

@troymcginnis
troymcginnis / middleware.js
Last active March 15, 2023 22:03
TOO_MANY_FILESYSTEM_CHECKS gist
import { NextResponse } from 'next/server'
import incrementalPaths from '@public/indices/incrementalPaths'
const proxyHost = process.env.LEADPAGES_BLOG_PROXY_HOST
const proxyPath = process.env.LEADPAGES_BLOG_PROXY_PATH
const patterns = incrementalPaths?.map(
(pathname) => new URLPattern({ pathname })
)
<?php
namespace App;
/**
* Custom Blade directives
*/
add_action('after_setup_theme', function () {
/**
* Icon Blade directives
*/
{{-- /resources/views/partials/hero.blade.php --}}
<section class="hero">
<div class="hero__images">
<img class="hero__images-back" src="{{ $bg_image }}" />
<img class="hero__images-front" src="{{ $front_image }}" />
</div>
<div class="container">
<h1>{{ $title }}</h1>
<p>{{ $sub_title }}</p>
@troymcginnis
troymcginnis / App.php
Last active April 29, 2018 20:29
Sage 9 Component Controllers
<?php
// app/controllers/App.php
namespace App;
use Sober\Controller\Controller;
class App extends Controller
{
use Blocks;