Skip to content

Instantly share code, notes, and snippets.

View vedovelli's full-sized avatar
💭
🚀

Fábio Vedovelli vedovelli

💭
🚀
View GitHub Profile
@vedovelli
vedovelli / vedovelli-cursor-general-rules.mdc
Created March 25, 2025 21:08
Vedovelli Cursor Rules - general rules
You are a senior software engineer specialized in building highly-scalable and maintainable systems.
# Guidelines
When a file becomes too long, split it into smaller files. When a function becomes too long, split it into smaller functions.
After writing code, deeply reflect on the scalability and maintainability of the code. Produce a 1-2 paragraph analysis of the code change and based on your reflections - suggest potential improvements or next steps as needed.
DO NOT make big assumptions. When in doubt, ALWAYS ask before making an implementation.
# Planning
@vedovelli
vedovelli / gist:686ee125f2da67bc8adb9295f7fe36d9
Created January 22, 2025 11:15
cursorrules-laravel-react
You are an expert in Laravel, Inertia.js, React and Tailwind CSS, with a strong emphasis on Laravel and PHP best practices.Key Principles- Write concise, technical responses with accurate PHP examples.- Follow Laravel best practices and conventions.- Use object-oriented programming with a focus on SOLID principles.- Prefer iteration and modularization over duplication.- Use descriptive variable and method names.- Favor dependency injection and service containers.PHP and Laravel Core- Use PHP 8.3+ features when appropriate (e.g., typed properties, match expressions).- Follow PSR-12 coding standards.- Use strict typing: declare(strict_types=1);- Utilize Laravel's built-in features and helpers when possible.- Follow Laravel's directory structure and naming conventions.- Use lowercase with dashes for directories (e.g., app/Http/Controllers).- Implement proper error handling and logging: - Use Laravel's exception handling and logging features. - Create custom exceptions when necessary. - Use try-catch blocks for e
@vedovelli
vedovelli / Instructions.MD
Created January 7, 2025 09:29 — forked from diogogpinto/Instructions.MD
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:

# Salvar num arquivo ~/encode.sh, conceder direito de execução e
# executar desta forma (adaptar nomes de diretórios e arquivos para seu caso):
# $ ~/encode.sh ~/Video/bigFile.mp4 ~/Video/smallFile.mp4
ffmpeg -i "$1" -vcodec h264 -acodec aac "$2"
AxiosError: Request failed with status code 400
at settle (/Users/vedovelli/Shamrock/app-new/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (/Users/vedovelli/Shamrock/app-new/node_modules/axios/lib/adapters/http.js:505:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ERR_BAD_REQUEST',
config: {
transitional: {
silentJSONParsing: true,
@vedovelli
vedovelli / db.server.ts
Created September 23, 2022 18:37
Remix Prisma DB server
// @ts-nocheck
import { PrismaClient } from '@prisma/client';
let db: PrismaClient;
declare global {
let __db: PrismaClient | undefined;
}
// this is needed because in development we don't want to restart
2gua.rainbow-brackets
adampalhazi.vscode-debug-arrow-function
alexcvzz.vscode-sqlite
alfnielsen.vsc-organize-imports
aliariff.auto-add-brackets
andys8.jest-snippets
antfu.iconify
antfu.vite
apollographql.vscode-apollo
arcticicestudio.nord-visual-studio-code
{
"git.enableSmartCommit": true,
"workbench.editor.decorations.colors": true,
"editor.minimap.enabled": false,
"editor.accessibilitySupport": "off",
"zenMode.hideLineNumbers": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"tailwindCSS.includeLanguages": {
"typescriptreact": "html",
"plaintext": "html",
import type { LoaderFunction, ActionFunction } from "remix";
import { useLoaderData, useFetcher } from "remix";
import invariant from "tiny-invariant";
import cuid from "cuid";
import React from "react";
import type { Task, User } from "@prisma/client";
import { requireAuthSession } from "~/util/magic-auth";
import { ensureUserAccount } from "~/util/account";
import { placeCaretAtEnd } from "~/components/range";
import { getBacklog } from "~/models/backlog";
@vedovelli
vedovelli / Products.js
Last active November 29, 2021 07:25
Screencast Storybook
import { http } from "../../service/api";
import { Card } from "./Card";
import { Header, Spinner } from "../../components";
import { useQuery } from "react-query";
export default function Products() {
const { isLoading, isError, data } = useQuery(
"todos",
() => http.get("/products").then(({ data }) => data.products) // http contains baseURL with `/api`
);