Skip to content

Instantly share code, notes, and snippets.

View niladam's full-sized avatar

Madalin Tache niladam

View GitHub Profile
@pushpak1300
pushpak1300 / SKILL.md
Last active February 21, 2026 22:57
Formats Laravel config/*.php file comments using Laravel’s cascading three-line style. Ensures comment blocks follow the subtle line-length rhythm used in the framework’s core, preserving the clean, professional feel of first-party Laravel configuration files.
name description license
laravel-comments
Format Laravel config file comments using the cascading style. Use when writing or fixing comments in config/*.php files.
MIT

Laravel Cascading Comment Style

When to Use This Skill

@newtonjob
newtonjob / form.js
Created February 2, 2026 08:12
Form plugin for Alpine.js
document.addEventListener('alpine:init', () => {
Alpine.magic('form', el => () => {
return Alpine.reactive({
processing: false,
recentlySuccessful: false,
errors: {},
submit() {
return axios.post(el.action, el).then(response => {
this.errors = {};
this.recentlySuccessful = true;
@ivanfioravanti
ivanfioravanti / ccsettings.md
Last active February 23, 2026 05:45
Claude Code with various models

Using Claude Code with various AI providers

Create various settings file I have one file for each provider, all in ~/.claude

  • KIMI K2.5: kimi_settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
@jsadoski-rockhall
jsadoski-rockhall / SKILL.md
Created January 30, 2026 13:33
Logging Best Practices Skill
name description
Logging Best Practices
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

@driesvints
driesvints / gist:70162727698210274c3982ad87b37ed5
Last active February 13, 2026 20:13
Cloudflare PDF generation in Laravel.
// Controller method...
public function download()
{
return response()->streamDownload(function () {
$token = config('services.cloudflare.api_token');
$accountId = config('services.cloudflare.account_id');
$cloudflareApi = 'https://api.cloudflare.com/client/v4';
echo Http::withToken($token)
->post($cloudflareApi.'/accounts/'.$accountId.'/browser-rendering/pdf', [
@diogogpinto
diogogpinto / Instructions.MD
Created January 3, 2025 13:14
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method:

<?php
namespace App\Listeners;
use Exception;
use Throwable;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Process;
@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@andrasbacsai
andrasbacsai / firewall.sh
Last active April 19, 2025 14:31
Update a Hetzner Firewall rule with your IP address
#!/bin/bash
# Script to update a firewall rule in a Hetzner Firewall with your current IP address.
# Good if you would like to restrict SSH access only for your current IP address (secure).
#################
# WARNING: This script will overwrite all rules in the firewall rules, so make sure you
# added all the required rules.
# I use a separate firewall rule just for SSH access.
#################
@janedbal
janedbal / GarbageCollectorRule.php
Last active October 16, 2024 13:31
Following rule MAY improve PHPStan run time. It makes sense only when you disable GC for PHPStan execution.
<?php declare(strict_types = 1);
namespace ShipMonk\Rules\PHPStan\Rule;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\InClassNode;
use PHPStan\Rules\IdentifierRuleError;
use PHPStan\Rules\Rule;
use function gc_collect_cycles;