Skip to content

Instantly share code, notes, and snippets.

View OlinB's full-sized avatar

Olin OlinB

View GitHub Profile
@OlinB
OlinB / profile.ps1
Last active May 13, 2026 09:17
Powershell recursive folder comparaison
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
New-Alias -Name "php72" C:\laragon\bin\php\php-7.2.34-Win32-VC15-x64\php
New-Alias -Name "php73" C:\laragon\bin\php\php-7.3.9-Win32-VC15-x64\php
New-Alias -Name "php74" C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64\php
New-Alias -Name "php8" C:\laragon\bin\php\php-8.0.11-Win32-vs16-x64\php
New-Alias -Name "php81" C:\laragon\bin\php\php-8.1.10-Win32-vs16-x64\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 / 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 / Toggle-HerdDebug.ps1
Last active October 22, 2025 13:45
Toggle Herd debug
<#
.SYNOPSIS
Toggles PHP Xdebug in Laravel Herd by commenting/uncommenting lines in php.ini files
.DESCRIPTION
This script finds all php.ini files in Herd's bin directory and toggles the Xdebug configuration
by commenting or uncommenting the relevant lines.
.EXAMPLE
.\Toggle-HerdDebug.ps1
#>