Skip to content

Instantly share code, notes, and snippets.

@conradfuhrman
conradfuhrman / herd-reverb-ssl.md
Last active July 8, 2024 20:25
Laravel Herd, SSL, and Reverb with Herd

The biggest issue with Herd Pro is that you cannot use Reverb out of the box with a site that has SSL enabled. Here is the workaround for it all to play nicely together.

First you will need to create two sites. The two I have here are as follows:

  • reverb-ssl - This is a new Laravel 11 project using Breeze for the ease of Inertia. This also follows the setup for Reverb line by line.
  • wss-reverb-ssl - This is an empty directory, we are going to use this only for editing a Nginx config and setting up a proxy to the reverb service.

Screenshot 2024-04-03 at 2 33 08 PM

Of note is that I'm using Herd Pro as well, so all additional services are being used directly though Herd Pro itself.

@simonhamp
simonhamp / MigrateUsers.php
Last active February 1, 2024 10:16
Migrate Statamic v3 file-based users to a database
<?php
/**
* Statamic v3 User Migrator
* @author Simon Hamp <simon.hamp@me.com>
* @copyright Copyright (c) 2021, Simon Hamp
* @license MIT
*/
namespace App\Console\Commands;
use Exception;
@amir9480
amir9480 / helpers.php
Last active May 7, 2024 16:03
Laravel copy all files from one storage disk to another
<?php
if (! function_exists("copy_storage")) {
/**
* Copy files from one disk to another.
*
* @param string $from from disk name
* @param string $to to disk name
* @param string $directory if you want just copy specific directory
* @return void
@Dimimo
Dimimo / LinodeCopy.php
Last active May 15, 2024 16:03
A Laravel artisan command to help move your files from S3 to Linode
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Storage;
class LinodeCopy extends Command
{
/**
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active July 17, 2024 16:29
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@troglodyne
troglodyne / cP_clevel_mongler.pl
Last active February 17, 2022 20:55
[cPanel] Perl Mechanize script for setting all /var/cpanel/clevels.conf values at once
use strict;
use warnings;
use WWW::Mechanize;
use Term::ReadKey;
use Getopt::Long;
# Get options
my ( $host, $password, %opts );
GetOptions(