Skip to content

Instantly share code, notes, and snippets.

View lewislarsen's full-sized avatar

Lewis Larsen lewislarsen

View GitHub Profile
@lewislarsen
lewislarsen / phpBB-nginx-config-ploi.conf
Created July 25, 2021 02:16
phpBB nginx config for Ploi
# Ploi Webserver Configuration, do not remove!
include /etc/nginx/ploi/domain.com/before/*;
server {
listen 80;
listen [::]:80;
root /home/ploi/domain.com;
server_name domain.com;
@lewislarsen
lewislarsen / functions_custom.php
Last active August 25, 2021 00:17
Custom phpBB functions
<?php
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
@lewislarsen
lewislarsen / avatar-lang.php
Last active August 25, 2021 00:18
Custom Avatar
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
@lewislarsen
lewislarsen / payment.blade.php
Last active November 28, 2021 19:54
Recreated GitHub's sponsorship page in Tailwind (set tailwind.config.js to Inter Var font too!)
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" xmlns:x-transition="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>Sponsor @taylorotwell on GitHub Sponsors</title>
<link rel="shortcut icon" type="image/jpg" href="https://github.githubassets.com/favicons/favicon.png"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
@lewislarsen
lewislarsen / aliases.txt
Last active July 16, 2024 15:20
Bash aliases
## CUSTOM ALIASES
alias gst='git status'
alias push='git push'
alias models='php artisan ide-helper:generate && php artisan ide-helper:meta && php artisan ide-helper:models'
alias dev='npm run dev'
alias mf='php artisan migrate:fresh'
alias mfs='php artisan migrate:fresh --seed'
alias art='php artisan'
alias grst='git reset --hard HEAD'
alias tpl='php artisan test --parallel'
@lewislarsen
lewislarsen / MagicLinkEmailTest.php
Created January 17, 2023 20:00
The tests used for adding magic links to your Laravel application.
// tests/Feature/Mail/Auth/MagicLinkEmailTest.php
<?php
use App\Mail\Auth\MagicLinkEmail;
use App\Models\User;
test('the mail has the correct contents', function () {
$user = User::factory()->create();
@lewislarsen
lewislarsen / how.md
Created June 5, 2024 09:35
fix cURL error 60: SSL certificate problem: unable to get local issuer certificate

You may encounter the following error in your laravel.log when working with Valet, Websockets (Echo + Reverb) with a SSL certificate setup locally.

Laravel Websockets in valet cURL error 60: SSL certificate problem: unable to get local issuer certificate

To fix run the following command in a terminal:

@lewislarsen
lewislarsen / reverb-instructions.md
Last active September 1, 2024 17:34
Instructions for how to setup Laravel Reverb in Production.

Reverb Walkthrough

This guide covers configuring Laravel Reverb for production using services like Laravel Forge or Ploi.

1. Configuring Nginx

Add this to your nginx site configuration's server block:

location /app {