Skip to content

Instantly share code, notes, and snippets.

View LachlanArthur's full-sized avatar
🐊

Lachlan Arthur LachlanArthur

🐊
View GitHub Profile
@LachlanArthur
LachlanArthur / Dockerfile
Last active March 13, 2025 14:56
Docker Compose PHP 8.4 Starter
FROM dunglas/frankenphp:php8.4-bookworm
ARG WWW_UID=33
ARG WWW_GID=33
RUN install-php-extensions \
@composer \
intl \
zip \
opcache \
@LachlanArthur
LachlanArthur / compose.yml
Created March 13, 2025 14:49
Caddy Docker Proxy
version: "3.7"
services:
caddy:
image: lucaslorentz/caddy-docker-proxy:ci-alpine
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
@LachlanArthur
LachlanArthur / MiddlewareProfiling.php
Created September 14, 2024 09:43
Profiling middleware in Laravel 11 with the Laravel DebugBar
<?php
namespace App\Providers;
use App\Http\Middleware\Profiled;
use Closure;
use DebugBar\DebugBar;
use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
use Illuminate\Http\Request;
use Illuminate\Routing\Events\RouteMatched;
@LachlanArthur
LachlanArthur / convert.ps1
Created July 2, 2023 12:14
ffmpeg batch conversion
$indir = Resolve-Path 'in';
$outdir = Resolve-Path 'out';
$ffmpegBin = Get-Command -Name 'ffmpeg' -All -CommandType Application -ea Stop
$inputArgs = (
# '-loglevel', 'debug',
# GPU decode
# '-c:v', 'h264_cuvid',

Alien Colonial Marines Talents

All-Terrain Driver

Almost anyone can drive a tractor or APC, but with this talent you have experience driving all-terrain vehicles over rough terrain whilst minimizing damage to the vehicle.

Banter

Between fights, you release the tension in your team with some friendly banter.

Bodyguard

If someone within SHORT range of you is hit by an attack, you can dive in to take the hit.

interface ExtraAttributes {
role: string,
style: string | ( Partial<CSSStyleDeclaration> & Record<string, string> ),
classList: string[],
charset: string,
}
declare var React;
declare namespace JSX {
#requires -Version 2 -Modules posh-git
function Write-Theme {
param(
[bool]
$lastCommandFailed,
[string]
$with
)
# Install Scoop
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
# Exclude scoop dirs from Windows Defender
scoop install sudo
sudo Add-MpPreference -ExclusionPath "$env:HOME\scoop"
sudo Add-MpPreference -ExclusionPath "$env:ProgramData\scoop"
# Enable parallel downloads
@LachlanArthur
LachlanArthur / unhook_class_method.php
Last active November 11, 2019 05:31
WordPress - Unhook a class method from an action or filter, even if you don't have a reference to the class instance.
<?php
/**
* Removes hooks that trigger a certain class method,
* even if you don't have a reference to the class instance.
*
* @global \WP_Hook[] $wp_filter
* @param string $filter
* @param string $class
* @param string $method
@LachlanArthur
LachlanArthur / fader.js
Created June 19, 2019 08:29
Fader.js - Toggle a class between child elements. Make a simple gallery fader!
/**
* Toggle a class between child elements. Make a simple gallery fader!
*
* @param {Element} parent The wrapper element
* @param {string} activeClass Class to add to active child
* @param {number} timeout Milliseconds to wait between children
* @returns {() => void} Stop function that ends the fader
*
* @fires `beforeNext` Event fires before switching to new child. Bubbles. Cancelable with `preventDefault()`.
* - `e.target` => Current child