Skip to content

Instantly share code, notes, and snippets.

View StuMason's full-sized avatar
🏋️‍♂️
Testing

Stu Mason StuMason

🏋️‍♂️
Testing
  • Folkestone
View GitHub Profile
# Tailwind CSS v4 Guide: Key Differences from v3
## Installation
### Using PostCSS (Recommended)
```bash
npm install tailwindcss @tailwindcss/postcss postcss
```
Configure your PostCSS:
@StuMason
StuMason / gist:9e12fd7d726467e1f0889122347cd9c5
Created March 4, 2025 18:13
forge to coolify nixpack.toml
[phases.setup]
nixPkgs = ["...", "python311Packages.supervisor", "php82Extensions.redis"]
[phases.build]
cmds = [
# Create required directories in one command
"mkdir -p /var/log /app/storage/framework/{views,cache,sessions} /app/bootstrap/cache /etc/supervisor/conf.d",
# Set permissions in a single command
"chown -R www-data:www-data /var/log /app/storage /app/bootstrap/cache",
@StuMason
StuMason / gist:b988e3ca426afdd69173a26688de7728
Created March 4, 2025 18:11
forge -> coolify example 1, stuartmason.co.uk
[phases.setup]
nixPkgs = ["...", "python311Packages.supervisor", "php82Extensions.redis"]
[phases.build]
cmds = [
    "mkdir -p /var/log",
    "touch /var/log/nginx-access.log /var/log/nginx-error.log",
    "chown -R www-data:www-data /var/log",
    "chown -R www-data:www-data /app",
    "chmod -R 755 /app",
@StuMason
StuMason / docker-compose.yaml
Created February 14, 2025 10:09
Bolt.diy v0.0.6 Coolify Docker Compose file
version: '3.8'
services:
bolt:
image: bolt.diy:latest
pull_policy: build
platform: linux/arm64
build:
context: https://github.com/stackblitz-labs/bolt.diy.git#v0.0.6
target: bolt-ai-production
dockerfile_inline: |
@StuMason
StuMason / laravel-11-docs-for-llm-context
Created November 4, 2024 20:18
LLMs aren't upto date with the latest Laravel features. This is a condensed version of all new features from Laravel 10 to 11, for LLM Context use (Claude Projects, for example)
LARAVEL 11 - NEW FEATURES AND CHANGES
=== artisan ===
- **Isolatable Commands**: Implement the `Illuminate\Contracts\Console\Isolatable` interface to ensure only one instance of a command runs at a time. An `--isolated` option is added to the command for this purpose.
- **Lock ID**: Customize the atomic lock key by defining an `isolatableId` method in the command class.
- **Lock Expiration Time**: Adjust the expiration time of isolation locks by defining an `isolationLockExpiresAt` method in the command class.
- **Prompts for Missing Input**: Implement the `PromptsForMissingInput` interface to automatically prompt users for required arguments that are missing.
- **Custom Prompt Questions**: Use the `promptForMissingArgumentsUsing` method to customize questions for missing arguments.
- **After Prompting for Missing Arguments**: Implement the `afterPromptingForMissingArguments` method to handle additional input prompts after missing arguments are gathered.
<?php
namespace App\Aws;
use Aws\Credentials\CredentialProvider;
use Aws\Credentials\Credentials;
use Aws\Signature\SignatureV4;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\App;
@StuMason
StuMason / aws_mfa.py
Created May 6, 2022 11:04
AWS MFA switching
"""
Switching between accounts where MFA is required can be a little manually intensive.
This script updates a temporary profile with a key, secret and session token (using a more stable profile - in this case 'default').
You can then use this temporary profile to switch between accounts.
i.e I have my main profile
I created a `[mfa_temp_session]` profile in my credentials which looked like this:
@StuMason
StuMason / History|2ade281f|563H.json
Last active October 31, 2022 14:32
Visual Studio Code Settings Sync Gist
{
"python.testing.unittestArgs": [
"-v",
"-s",
".",
"-p",
"test_*.py"
],
"python.testing.pytestEnabled": false,
"python.testing.nosetestsEnabled": false,

Keybase proof

I hereby claim:

  • I am stumason on github.
  • I am stuissecure (https://keybase.io/stuissecure) on keybase.
  • I have a public key ASCSc6RXYvbgdOBz7fDVphqCNdn6hmnqsonQChQI0Ls-9Qo

To claim this, I am signing this object:

@StuMason
StuMason / AwsV4SignedRequestTrait.php
Last active October 12, 2018 10:26
AWS V4 Signature Request Trait - requires AWS-PHP-SDK. Below example used in a Laravel app. Returns a signed request.
<?php
namespace App\Traits;
use Psr\Http\Message\RequestInterface;
use Aws\Signature\SignatureV4;
use Aws\Credentials\CredentialProvider;
use Aws\Credentials\CredentialsInterface;
/**