Skip to content

Instantly share code, notes, and snippets.

View r3xakead0's full-sized avatar

Afu Tse r3xakead0

View GitHub Profile
@r3xakead0
r3xakead0 / AGENTS.md
Created January 6, 2026 17:09
AGENTS.md define las convenciones técnicas, decisiones de stack y reglas de comportamiento para agentes y colaboradores del proyecto, estableciendo estándares claros para TypeScript, pnpm, Astro, Tailwind CSS, organización de código, accesibilidad, testing, CI, rendimiento y flujo de trabajo, con el objetivo de eliminar ambigüedades y garantizar…

Convenciones

  • Usa pnpm para todo: pnpm install, pnpm add, pnpm dlx, pnpm dev, pnpm build
  • TypeScript es obligatorio
  • Usa siempre Tailwind CSS para estilos
  • Iconos de tabler-icons. Importación explícita, nunca barrels
  • Preferir ESM y sintaxis moderna del navegador

Creación de proyectos

  • Si hay que crear un proyecto nuevo, usa Astro
  • Comando recomendado:
@r3xakead0
r3xakead0 / delete-wif-oicd.sh
Created December 9, 2025 04:27
Cleanup script for Workload Identity Federation (OIDC)
#!/bin/bash
# ---------------------------------------------------------------------
# Author: Afu Tse
# GitHub Repo: https://github.com/r3xakead0/gcp-tf-notes-app-serverless
# Description: Cleanup script for Workload Identity Federation (OIDC)
# ---------------------------------------------------------------------
set -e
export PROJECT_ID="bootcamp-478214"
@r3xakead0
r3xakead0 / create-wif-oidc.sh
Created December 9, 2025 04:22
Workload Identity Federation (OIDC) Setup Script
# ---------------------------------------------------------------------
# Author: Afu Tse
# GitHub Repo: https://github.com/r3xakead0/gcp-tf-notes-app-serverless
# Description: Workload Identity Federation (OIDC) Setup Script
# ---------------------------------------------------------------------
#!/bin/bash
set -e
export PROJECT_ID="bootcamp-478214"
@r3xakead0
r3xakead0 / create-gke-standard-regional-cluster.sh
Last active November 25, 2025 16:26
Create a GKE Standard Regional Cluster (High Availability)
#!/bin/sh
set -e # Stop the script if any command fails
# Get the currently configured GCP Project ID
PROJECT_ID=$(gcloud config get-value project --quiet)
# Validate that a project is set
if [ -z "$PROJECT_ID" ]; then
echo "❌ ERROR: No project is configured in gcloud."
echo "Run: gcloud config set project <PROJECT_ID>"
@r3xakead0
r3xakead0 / create-gke-standard-cluster.sh
Last active November 25, 2025 19:47
Create a GKE Standard cluster
#!/bin/sh
set -e # Stop the script if any command fails
# Get the currently configured GCP Project ID
PROJECT_ID=$(gcloud config get-value project --quiet)
# Validate that a project is set
if [ -z "$PROJECT_ID" ]; then
echo "❌ ERROR: No project is configured in gcloud."
echo "Run: gcloud config set project <PROJECT_ID>"
@r3xakead0
r3xakead0 / deploy.sh
Last active November 25, 2025 20:09
Hello World deployed in GKE Cluster
#!/bin/sh
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
kubectl apply -f ingress.yaml
kubectl get deployment
kubectl autoscale deployment helloworld-deployment \
--cpu-percent=60 \
@r3xakead0
r3xakead0 / create-gke-autopilot.sh
Last active November 25, 2025 16:32
Create a GKE Autopilot cluster
#!/bin/sh
set -e # Stop the script if any command fails
# Get the currently configured GCP Project ID
PROJECT_ID=$(gcloud config get-value project --quiet)
# Validate that a project is set
if [ -z "$PROJECT_ID" ]; then
echo "❌ ERROR: No project is configured in gcloud."
echo "Run: gcloud config set project <PROJECT_ID>"
@r3xakead0
r3xakead0 / add-load-balancing.sh
Last active November 10, 2025 17:32
Create multiple web server instances with load balancing service in GCP
#!/bin/sh
# Set default region and zone
gcloud config set compute/region europe-west1
gcloud config set compute/zone europe-west1-b
# Create a static IP address
gcloud compute addresses create network-lb-ip-1 \
--region europe-west1
@r3xakead0
r3xakead0 / lb-backend.sh
Created November 10, 2025 17:15
Create a HTTP load balancer in GCP
# Set default region and zone
gcloud config set compute/region europe-west1
gcloud config set compute/zone europe-west1-b
# Create an instance template
gcloud compute instance-templates create lb-backend-template \
--region=europe-west1 \
--network=default \
--subnet=default \
--tags=allow-health-check \
@r3xakead0
r3xakead0 / index.html
Created October 19, 2025 21:51
Ejemplo de una página web sencilla con HTML, CSS y JS
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Ejemplo: index.html con CSS y JS</title>
<style>
/* CSS embebido: estilos simples */
:root{
--bg: #f7f9fc;