Skip to content

Instantly share code, notes, and snippets.

View benjamincrozat's full-sized avatar
🏠
Working from anywhere in the world.

Benjamin Crozat benjamincrozat

🏠
Working from anywhere in the world.
View GitHub Profile
@benjamincrozat
benjamincrozat / browser.md
Last active January 14, 2026 15:17
Add this to your AGENTS.md file. What I do instead: my AGENTS.md file routes toward multiple files that take care of a particular topic.

Browser

This file exists to help you use the browser effectively to validate visuals and interactivity.

Non-negotiables

  • Always verify the actual behavior in a real browser (not just “looks right” in code).
  • When reporting results, provide evidence: what page you visited, what you clicked/typed, and what you observed (and any console errors).

Quick workflow (every UI change)

@benjamincrozat
benjamincrozat / backend.mdc
Created January 3, 2026 16:27
Put it in .cursor/rules/best-practices or wherever you prefer
---
alwaysApply: true
---
## Code style & clarity
- Always document intent for ambiguous or non-obvious code. Explain why the code exists (not what it does).
- Always import namespaces.
- Avoid one letter or ambiguous variable names.
- Comments start with a capital letter and end with a period.
#!/bin/bash
# Define the output file
output_file="combined.md"
# Remove the output file if it exists to avoid including it in the search
if [ -f "$output_file" ]; then
rm "$output_file"
fi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?php
namespace App\Providers;
use App\GitHub;
use App\Models\Post;
use App\JobsCollector;
use Cloudinary\Cloudinary;
use App\Actions\TrackVisit;
use Barryvdh\Debugbar\Facades\Debugbar;
@benjamincrozat
benjamincrozat / tailwind.blade.php
Last active August 3, 2023 19:55
A nice Tailwind CSS-based design for LengthAwarePaginator.
@if ($paginator->hasPages())
<nav role="navigation" aria-label="{{ __('Pagination Navigation') }}" class="flex items-center justify-between mt-16">
<div class="text-gray-400 dark:text-gray-800">
{{ $paginator->count() }}
{!! __('of') !!}
<span>{{ $paginator->total() }}</span>
{!! __('results') !!}
</div>
<div class="flex gap-1">
{
"Ansi 6 Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0.78166204690933228,
"Alpha Component" : 1,
"Green Component" : 0.77425903081893921
},
"Tags" : [
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
executionOrder="random"
>
<testsuites>
<testsuite name="Tests">
provider:
iamRoleStatements:
- Effect: Allow
Action: [dynamodb:Query, dynamodb:Scan, dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:DeleteItem]
Resource:
Fn::GetAtt: [ChirpCache, Arn]
- Effect: Allow
Action: [sqs:SendMessage, sqs:DeleteMessage]
Resource:
Fn::GetAtt: [ TwitterQueue, Arn ]
CACHE_DRIVER=dynamodb
DYNAMODB_CACHE_TABLE=foo