Skip to content

Instantly share code, notes, and snippets.

@jsadoski-rockhall
jsadoski-rockhall / SKILL.md
Created January 30, 2026 13:33
Logging Best Practices Skill
name Logging Best Practices
description Use before implementing logs in a medium to large scale production system.

This skill is adpated from "Logging sucks. And here's how to make it better. by Boris Tane.

When helping with logging, observability, or debugging strategies, follow these principles:

Core Philosophy

@Shpigford
Shpigford / readme
Created January 20, 2026 20:33
/readme
---
name: readme
description: When the user wants to create or update a README.md file for a project. Also use when the user says "write readme," "create readme," "document this project," "project documentation," or asks for help with README.md. This skill creates absurdly thorough documentation covering local setup, architecture, and deployment.
---
# README Generator
You are an expert technical writer creating comprehensive project documentation. Your goal is to write a README.md that is absurdly thorough—the kind of documentation you wish every project had.
## The Three Purposes of a README
@emschwartz
emschwartz / README.md
Last active March 27, 2026 16:19
The Most Popular Blogs of Hacker News in 2025

This is an OPML version of the HN Popularity Contest results for 2025, for importing into RSS feed readers.

Plug: if you want to find content related to your interests from thousands of obscure blogs and noisy sources like HN Newest, check out Scour. It's a free, personalized content feed I work on where you define your interests in your own words and it ranks content based on how closely related it is to those topics.

<?php
// if you wanna use defer in a package where it may only be optional
// or you don't know or want to mess with if defer is already supported
// also swoole compatible if you get this error:
// Symfony\Component\ErrorHandler\Error\FatalError: Uncaught Swoole\Error: API must be called in the coroutine
if (! function_exists('safeDefer')) {
/**
# SETUP #
DOMAIN=example.com
PROJECT_REPO="git@github.com:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
<?php
namespace App\Livewire\Attributes;
use Attribute;
use Livewire\Features\SupportAttributes\Attribute as LivewireAttribute;
use function Livewire\store;
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS | Attribute::TARGET_METHOD)]
<?php
\Illuminate\Support\Str::macro('extremeSnake', function($value, $delimiter = '_') {
$pattern = <<<'REGEXP'
/
(?<!^) # don't match the beginning of a string
(
(?<=[^\p{Lu}])[\p{Lu}\p{M}]+(?=\p{M}?[^\p{Ll}]\p{M}?\p{L}) # string of upper-case (like an abbreviation)
| (?<=\p{Lu}{2})[\p{Lu}\p{M}](?=\p{M}?\p{Ll}) # the final upper-case in a sequence
| (?<=[^\p{Lu}])[\p{Lu}\p{M}](?=\p{M}?\p{Ll}) # first upper-case in a capitalized sequence
@EllyLoel
EllyLoel / reset.css
Last active September 30, 2025 18:40
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
@matthiasnoback
matthiasnoback / EloquentModelAttributesRule.php
Created March 8, 2022 12:40
PHPStan rule and test combined
<?php
declare(strict_types=1);
namespace Utils\PHPStan;
use Generator;
use Illuminate\Database\Eloquent\Model;
use PhpParser\Node;
use PhpParser\Node\Expr\PropertyFetch;
@aglipanci
aglipanci / ExportableCollections.php
Created March 7, 2022 17:36
Exportable Collections using maatwebsite/excel
<?php
Collection::macro('export', function (string $filename, array $headers = []) {
return (new class($this, $headers) implements FromCollection, WithHeadings{
use Exportable;
public function __construct(
private \Illuminate\Support\Collection|\Illuminate\Database\Eloquent\Collection $collection,
private array $headings = []
) {