Skip to content

Instantly share code, notes, and snippets.

View iamdadmin's full-sized avatar

iamDadmin iamdadmin

View GitHub Profile
@iamdadmin
iamdadmin / gitclean-setup
Created March 31, 2026 05:36
Gitclean - a simple shell script (aimed at macos paths but you can adapt for linux) to automate the pruning of deleted git branches
# Create the script and place it in ~/.local/bin/gitclean, setting it +x
echo '#!/usr/bin/env bash
# Update remote references
git fetch --prune
# Identify and delete local branches that no longer exist on remote
git branch -vv | grep "gone]" | awk "{print \$1}" | xargs git branch -D
' > ~/.local/bin/gitclean && chmod +x ~/.local/bin/gitclean
@iamdadmin
iamdadmin / AppBootServiceProvider.php
Last active March 8, 2025 20:03
Simple, if somewhat wasteful, automatic page refresh for Filament under Frankenphp
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Route;
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;
use Symfony\Component\HttpFoundation\StreamedResponse;