Skip to content

Instantly share code, notes, and snippets.

View chapterjason's full-sized avatar
🕳️
<- Insert Bug

Jason Schilling chapterjason

🕳️
<- Insert Bug
View GitHub Profile
@chapterjason
chapterjason / Order.php
Created November 6, 2025 20:44 — forked from tito10047/Order.php
EasyAdmin sortable CollectionField
<?php
//App/Entity/Order.php
#[ORM\Entity()]
#[ORM\Table(name: '`order`')]
class Order {
#[ORM\OneToMany(targetEntity: OrderItem::class, mappedBy: 'order', cascade: ["persist", "remove"], orphanRemoval: true)]
#[ORM\OrderBy(["position" => "ASC"])]
#[Assert\Valid]
private Collection $items;

Yubikey GPG inside WSL2

  1. Install GPG4Win.
  2. Start up Kleopatra (a UI tool from 1) and make sure your YubiKey is loaded there.
    • You can also add GPG4Win to Startup folder using a link with this Target:
      "C:\Program Files (x86)\GnuPG\bin\gpg-connect-agent.exe" /bye
      
      This will only load the agent at Startup, and you won't be bothered by any UI or tray agent.
  3. Download wsl2-ssh-pageant into your Windows %userprofile%/.ssh directory (Windows dir is important for performance).
@chapterjason
chapterjason / S3FileStream.php
Created June 21, 2023 10:29 — forked from progress44/S3FileStream.php
Laravel response class to handle S3 file stream
<?php
namespace App\Http\Responses;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class S3FileStream
{
/**