Skip to content

Instantly share code, notes, and snippets.

@OlinB
OlinB / Octobercms3ValetDriver.php
Last active February 21, 2025 14:26
Laravel Herd OctoberCMS driver
<?php
namespace Valet\Drivers\Custom;
use Valet\Drivers\LaravelValetDriver;
class OctobercmsValetDriver extends LaravelValetDriver {
public function serves(string $sitePath, string $siteName, string $uri): bool
{
return file_exists($sitePath . '/bootstrap/autoload.php') && file_exists($sitePath . '/modules/system/console/OctoberAbout.php');
@OlinB
OlinB / Events.php
Last active November 1, 2024 17:18
Octobercms calendar controller
<?php namespace Inetis\Demo\Controllers;
use BackendMenu;
use Backend\Classes\Controller;
use Carbon\Carbon;
use Illuminate\Support\Facades\Response;
use Inetis\Demo\Models\Event;
use Redirect;
class Events extends Controller
@OlinB
OlinB / profile.ps1
Last active February 26, 2025 11:00
Powershell recursive folder comparaison
<# Goes in Documents\PowerShell\profile.ps1 #>
<# usage: CompareDir -path1 path\to\folder\1 -path2 path\to\folder\2 #>
function Get-Files {
param (
[string]$path,
[string[]]$exclude
)