Skip to content

Instantly share code, notes, and snippets.

View mgaitan's full-sized avatar
🛠️
devex

Martín Gaitán mgaitan

🛠️
devex
View GitHub Profile
@mgaitan
mgaitan / estafa_amazon.txt
Last active July 31, 2025 19:28
ESTAFA DE AMAZON . no me mandaron el producto y ahora sale mas caro
Chat de servicio al cliente
more
No hay mensajes anteriores
image alt text
Hola, estás en el lugar adecuado para el servicio de atención al cliente.
Your Image
DEWALT 20V MAX Pruning Shears Garden Tool, Cordless, Bare Tool Only (DCPR320B)
¿Es esto con lo que necesitas ayuda?
M
No, tengo un problema diferente
@mgaitan
mgaitan / autopep723_rocks.py
Created July 25, 2025 12:15
A demo script for autopep723 blog post. Look mom, just plain imports!
import httpx
from pyfiglet import Figlet
from rich.console import Console
from rich.text import Text
def gradient(text, start=(255, 0, 0), end=(0, 255, 255)):
lines = text.splitlines()
width = max(len(line) for line in lines)
grad = [(
import httpx
from pyfiglet import Figlet
from rich.console import Console
from rich.text import Text
def gradient(text, start=(255, 0, 0), end=(0, 255, 255)):
lines = text.splitlines()
width = max(len(line) for line in lines)
grad = [(
@mgaitan
mgaitan / autopep723_example.py
Created July 22, 2025 16:53
An example to test autopep723 with a remote script
import requests
from rich.pretty import pprint
resp = requests.get("https://peps.python.org/api/peps.json")
data = resp.json()
pprint([(k, v["title"]) for k, v in data.items()][:10])
@mgaitan
mgaitan / la_mas_recondita_memoria.md
Last active July 15, 2025 18:14
Citas de "La más recóndita memoria de los hombres" de Mohamed Mbougar Sarr

La más recóndita memoria de los hombres

— Mohamed Mbougar Sarr — 2022

la vida es lo que hay en medio de tal y vez, ¡a lo mejor acabas amargado!, ¡decepcionado!, ¡marginado!, ¡fracasado! Sí, es posible, decía yo. La infatigable tercera del plural insistía: ¡igual acabas suicidándote! Sí, tal vez; pero la vida es lo que hay en medio de tal y vez, replicaba yo. Intento caminar sobre un cable tendido entre esas dos palabras. Si me caigo, mala suerte: ya veré entonces qué vive o muere ahí abajo. (p. 20)


Apuesto a que eres escritor. O aprendiz de escritor. No te sorprendas: he aprendido a reconocer a los de tu especie al primer vistazo. Miran las cosas como si detrás de cada una de ellas hubiese un profundo secreto. Ven un sexo de mujer y lo contemplan como si encerrase la clave de su misterio. Estetizan. Pero un coño no es más que un coño. No vale la pena babear vuestro lirismo o vuestra mística con los ojos anegados. No se puede vivir el instante y escribirlo al mismo tiempo. —Por supuesto que s

@mgaitan
mgaitan / honeycomb_cleanup.py
Created July 8, 2025 22:09
clean up inactive datasets in Honeycomb
#!/usr/bin/env python3
"""
Honeycomb Dataset Cleanup Script
This script helps clean up inactive datasets in Honeycomb.
It lists datasets with no activity in the last N days and allows deletion.
Usage:
python honeycomb_cleanup.py # List inactive datasets (60 days)
python honeycomb_cleanup.py --days 30 # List inactive datasets (30 days)
[Unit]
Description=Readeck - Open Source bookmark manager
After=network.target
[Service]
User=readeck
Group=readeck
ExecStart=/usr/local/bin/readeck serve -config /etc/readeck/config.toml
Restart=on-failure
RestartSec=5
@mgaitan
mgaitan / prepare_commit_msg
Created March 17, 2025 19:58
llm powered git commit message
#!~/.local/share/uv/tools/llm/bin/python
"""
Git hook script for automatically generating commit messages using llm.
Installation:
1. Install `llm` if not already installed:
uv tool install llm
2. Install and configure a model (e.g., gemini):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mgaitan
mgaitan / README.md
Last active February 28, 2025 14:36
User Script: Adds a button on a GitHub Actions run page to jump to the newest run on the same workflow+branch

Github Actions: Link to newest run

This is a user script that adds a button on any GitHub Actions run page (summary or job) to jump directly to the newest run on the same workflow and branch.

Why?

You push a commit, which triggers a new CI run, but you are still viewing an old run or job in GitHub Actions. Switching to the newly triggered run or job can be cumbersome. This script automatically checks for a newer run on the same workflow and branch, then shows a button to jump there. If you are on a specific job page, it even links you to the equivalent job in the newer run. This way, you avoid digging through lists of runs or re-navigating from scratch.

image