Skip to content

Instantly share code, notes, and snippets.

View YannBirba's full-sized avatar
⚛️
React ♥️

Yann YannBirba

⚛️
React ♥️
View GitHub Profile
@pierceboggan
pierceboggan / tdd.agent.md
Last active November 29, 2025 08:19
Test Driven Development Custom Agent
description tools
Automated TDD workflow: write failing test, implement feature, verify passing test
edit
search
runCommands
runSubagent
playwright-test/test_list
playwright-test/test_run
github/*
problems
testFailure

You are a Test-Driven Development automation expert. Your role is to execute the complete TDD cycle autonomously: Red → Green → Refactor.

CRITICAL RULE: TEST-FIRST ENFORCEMENT

🚨 NEVER write production code before writing a failing test.

@burkeholland
burkeholland / ainstall.md
Last active December 10, 2025 23:24
Boost

Boost Prompt

A prompt to boost your lazy "do this" prompts. Install with one of the buttons below.

Install in VS Code Install in VS Code Insiders

Use

@intellectronica
intellectronica / raycast-4-1-beast-mode.md
Last active November 24, 2025 13:01
GPT-4.1 Beas Mode Raycast AI Preset (port of @burkeholland's GitHub Copilot Chat Beast Mode )

You are an autonomous agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.

Your thinking should be thorough and so it's fine if it's very long. Whenever you need to think more deeply, use the @thinking tool. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.

You MUST iterate and keep going until the problem is solved.

You have everything you need to resolve this problem. I want you to fully solve this autonomously before coming back to me.

Only terminate your turn when you are sure that the problem is solved and all items have been checked off. Go through the problem step by step, and make sure to verify that your changes are correct. NEVER end your turn without having truly and completely solved the problem, and when you say you are going to make a tool call, make sure you ACTUALLY make the tool call, instead of ending your turn.

@t3dotgg
t3dotgg / try-catch.ts
Last active December 10, 2025 16:45
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@sergiodxa
sergiodxa / crud.ts
Last active April 21, 2025 04:56
A crud helper for RRv7 routes.ts file
import { index, prefix, route } from "@react-router/dev/routes";
import { camelize, pluralize, singularize } from "inflected";
function createCrud(base = "./views") {
/**
* Create a CRUD route configuration.
* @param name The name of the resource. It will be pluralized for the path.
* @param options The options for the crud.
* @param options.member Extra routes to add to each member.
* @param options.collection Extra routes to add to the collection.
@cjkihl
cjkihl / settings.json
Created December 9, 2024 04:33
TailwindCSS Config for Autocomplete
{
// Config for VsCode Tailwind CSS IntelliSense extension for React
// Type hints for className and class attributes
"tailwindCSS.classAttributes": [
"class",
"className",
],
// Type hints for variables and properties ending with *className
"tailwindCSS.experimental.classRegex": [
@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.
#################
# 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)
@eusonlito
eusonlito / 01-README.md
Last active November 28, 2025 20:30
SQLite optimization for Laravel

The SQLite optimizations must be carried out at two different times: once in a unique and permanent way for the database and another time for each connection that is made. Below are the configurations that should be made in each case.

Unique and Permanent Configurations

These configurations are set only once and affect the database persistently, meaning they do not need to be reconfigured each time a connection is established:

PRAGMA journal_mode = WAL;

Sets the database journal mode to "WAL" (Write-Ahead Logging), which improves performance in concurrent operations.

@AlemTuzlak
AlemTuzlak / gist:9ecd385e7e3b57ba80c36914123800e8
Created March 2, 2024 11:12
react-query adapter for remix
import { QueryClient } from "@tanstack/react-query";
import { CacheAdapter, createCacheAdapter } from "remix-client-cache";
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 1000 * 60 * 5,
},
},
});