Skip to content

Instantly share code, notes, and snippets.

View leek's full-sized avatar

Chris Jones leek

View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
APP_DIRS=(
"/Applications"
"$HOME/Applications"
)
if ! command -v brew >/dev/null 2>&1; then
echo "Error: Homebrew not found in PATH" >&2
@leek
leek / filament-decision-tables.md
Last active November 19, 2025 17:58

Decision Tables / Rules Engine

A Filament plugin for creating and managing decision tables (rules engine). Empower business users to create, update, and review complex decision logic through an intuitive visual interface - no code required.

Video

image

Screenshots

@leek
leek / settings.json
Last active November 10, 2025 10:46
~/.claude/settings.json
{
"alwaysThinkingEnabled": true,
"statusLine": {
"type": "command",
"command": "npx -y ccstatusline@latest",
"padding": 0
},
"hooks": {
"PreToolUse": [
{
@leek
leek / MigrateFreshPreserve.php
Created November 3, 2025 19:29
Laravel command to drop all tables and re-run migrations while preserving specified tables.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Schema;
class MigrateFreshPreserve extends Command
@leek
leek / FilamentServiceProvider.php
Created November 3, 2025 13:36
Show "{Model} created" + "Go to record" button after CreateAction in Filament PHP.
<?php
use Filament\Actions;
use Filament\Notifications\Actions\Action;
use Filament\Notifications\Notification;
use Filament\Facades\Filament;
public function boot(): void
{
Actions\CreateAction::configureUsing(function (Actions\CreateAction $action): void {
@leek
leek / ConfigDiffVendorCommand.php
Last active October 30, 2025 22:29
Report which published Laravel config files differ from their vendor originals (and optionally delete unchanged ones).
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class ConfigDiffVendorCommand extends Command
{
protected $signature = 'config:diff-vendor
@leek
leek / HasActiveIcon.php
Created October 1, 2025 15:07
HasActiveIcon trait for Filament v4
<?php
namespace App\Concerns;
use Filament\Support\Icons\Heroicon;
use BackedEnum;
use Illuminate\Contracts\Support\Htmlable;
trait HasActiveIcon
{
@leek
leek / .gitconfig
Created August 26, 2025 17:04
~/.gitconfig
[core]
excludesfile = ~/.gitignore
editor = subl -n -w
# pager = diff-so-fancy | less -r
autocrlf = input
#[include]
# path = ~/.gitconfig.local
[alias]
cp = cherry-pick
st = status -s
@leek
leek / tailwind.config.js
Created May 22, 2025 20:34
Automatically add @apply directives to the tailwind.config.js safelist.
import defaultTheme from 'tailwindcss/defaultTheme'
/** @type {import('tailwindcss').Config} */
const config = {
content: [
'./js/**/*.{js,vue}',
],
darkMode: 'false',
<?php
namespace App\Concerns;
use Illuminate\Contracts\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
trait HasPrimary
{