Skip to content

Instantly share code, notes, and snippets.

View ziadoz's full-sized avatar

Jamie York ziadoz

View GitHub Profile
@ziadoz
ziadoz / debug_playwright.sh
Created September 4, 2025 12:49
Debug Playwright Command
#!/usr/bin/env bash
DEBUG=pw:protocol DEBUG_FILE=logs.txt ./node_modules/.bin/playwright run-server --host [HOST] --port [PORT] --mode launchServer
@ziadoz
ziadoz / console.php
Created September 2, 2025 15:31
Laravel 12 - What happens when queue:work command is killed...
<?php
// In a Terminal tab run:
// > php artisan scratch && php artisan queue:work --queue=test
//
// In a new Terminal tab run:
// > kill -[NUM] $(pidof -s php artisan queue:work)
//
// Results:
// -2 (SIGINT) = Job continues looping.
@ziadoz
ziadoz / docker-compose.yml
Created July 29, 2025 15:44
Connect CyberDuck client to Docker Minio Instance
services:
minio:
image: minio/minio:latest
restart: always
hostname: minio
ports:
- "9000:9000"
- "9001:9002"
environment:
MINIO_ROOT_USER: minio
@ziadoz
ziadoz / easy_dual_boot_win_lin.txt
Created July 3, 2025 22:23
Easy Dual Boot Windows/Linux
A simple way to dual boot that doesn't involve messing around with boot managers and master boot records:
- Install Windows on SSD 1.
- Disconnect SSD 1.
- Install Linux on SSD 2.
- Reconnect SSD 1.
- Use BIOS boot device selector menu to switch (e.g. F8).
@ziadoz
ziadoz / console.php
Last active June 5, 2025 09:13
Laravel 12.x - Lazy Ghost Contextual Attribute
<?php
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Container\ContextualAttribute;
use Illuminate\Support\Facades\Artisan;
#[Attribute(Attribute::TARGET_PARAMETER)]
class LazyGhost implements ContextualAttribute
{
/**
@ziadoz
ziadoz / youtube_rss.txt
Last active May 29, 2025 21:55
YouTube RSS URLs
Channel: https://www.youtube.com/feeds/videos.xml?channel_id=<channel-id>
Playlist: https://www.youtube.com/feeds/videos.xml?playlist_id=<playlist-id>
User: https://www.youtube.com/feeds/videos.xml?user=<user_id>
Link: https://news.ycombinator.com/item?id=32192352
@ziadoz
ziadoz / ParallelTestingServiceProvider.php
Created May 23, 2025 15:28
Laravel 12 - Custom Connection for Parallel Testing
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Illuminate\Testing\Concerns\TestDatabases;
use Illuminate\Testing\ParallelTestingServiceProvider as LaravelParallelTestingServiceProvider;
// Laravel doesn't support changing the database connection when running tests in parallel, so we have to override the relevant method.
@ziadoz
ziadoz / firefox.sh
Created May 20, 2025 13:55
Isolate Firefox Profile
#!/usr/bin/env bash
PROFILEDIR="$(mktemp -d)"
firefox --no-remote --profile "$PROFILEDIR" --screenshot $PWD/output.png https://xkcd.com
rm -r "$PROFILEDIR"
@ziadoz
ziadoz / js-return.js
Created April 1, 2025 14:03
JS Function Return
// @see: https://github.com/hassanshaikley/pico-pubsub
foo = () => ('foo', 'bar');
console.log(foo()); // Returns 'bar'
@ziadoz
ziadoz / view-transitions.css
Created January 8, 2025 09:49
CSS View Transitions
@view-transition {
navigation: auto;
}
::view-transition-old(*),
::view-transition-new(*) {
animation: none;
mix-blend-mode: normal;
}