Skip to content

Instantly share code, notes, and snippets.

View reduardo7's full-sized avatar
💭
🤔

Eduardo Daniel Cuomo reduardo7

💭
🤔
View GitHub Profile
@reduardo7
reduardo7 / README.md
Created May 27, 2026 20:12
Claude Code Usage

Claude Code Usage

Capture the Claude CLI's /usage panel as structured JSON.

claude-usage.py drives the interactive claude TUI through a pseudo-terminal (PTY): it launches claude, types /usage, snapshots the rendered screen, shuts the process down cleanly, parses the screen, and prints structured JSON.

Requirements

@reduardo7
reduardo7 / README.md
Last active October 30, 2025 19:18
AI - Commands

AI - Commands

Cursor / Claude / Copilot commands.

@reduardo7
reduardo7 / repository-history.sh
Created August 25, 2025 12:47
GIT Repository History scanner
#!/bin/bash
# Analyzes git commit history to find ticket-related commits
# Usage: ./repository-history.sh [-h COMMIT_HASH] [-t TICKET] [-a AUTHOR] [-d DAYS]
# - Without arguments: Shows ticket commits from current branch (last 30 days)
# - -h COMMIT_HASH: Shows ticket commits up to that hash in current branch (within specified days)
# - -t TICKET: Filters results to show only commits for specific ticket (e.g., OV-12345)
# - -a AUTHOR: Filters results by author name/email (case-insensitive partial match)
# - -d DAYS: Number of days to look back (default: 30)
# - All flags can be combined: -h HASH -t TICKET -a AUTHOR -d DAYS
@reduardo7
reduardo7 / output_prefix.sh
Last active November 4, 2025 15:02
Output prefix with timestamp
#!/usr/bin/env bash
{
echo foo 1
sleep 1
echo bar 1 >&2
echo foo 2
sleep 1
echo bar 2 >&2
} \
@reduardo7
reduardo7 / log_prefix.sh
Last active April 29, 2023 13:22
Bash output prefix and redirect to a file with timestamp
#!/usr/bin/env bash
[ -f test.log ] && rm -f test.log
{
{
echo foo 1
sleep 1
echo bar 1 >&2
echo foo 2
@reduardo7
reduardo7 / README.md
Last active January 10, 2022 20:28
DB with Revision History
@reduardo7
reduardo7 / README.md
Last active December 15, 2024 01:00
DB with Revision History

DB with Revision History

First, you have only one table to handle everything, in order to keep the model design and the data integrity at only one point.

This is the basic idea, you can extend the design with the created_by & updated_by columns if you need.

The following implementation is for MySQL, but the idea can be implemented at other kind of SQL databases too.

Cons

@reduardo7
reduardo7 / gdrive-upload.sh
Last active March 4, 2024 09:15
Upload to Google Drive.
#!/usr/bin/env bash
# https://towardsdatascience.com/uploading-files-to-google-drive-directly-from-the-terminal-using-curl-2b89db28bb06
# Require "curl"
# $ sudo apt install curl # Linux Debian/Ubuntu
# $ brew install curl # Mac
_err() {
echo >&2 "Error! $*"
@reduardo7
reduardo7 / meet-mute.js
Last active July 1, 2021 12:34
Google Meet mute/unmute with media keys
if(window.__meetMutePlay__){console.warn('Already loaded!');}else{(function(){
const log = (...args) => console.info('Mute-Play:', ...args);
if (!('mediaSession' in navigator)) { log('The Media Session API is not yet available. Try Chrome for Android.'); return; }
const muteBtn = document.querySelector('[data-is-muted] > div');
if (!muteBtn) { log('Mute button not found!'); return; }
navigator.mediaSession = navigator.mediaSession || {};
@reduardo7
reduardo7 / index.html
Created November 24, 2020 22:11
Patagonian | IUPA | DOM HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> -->
<title>Listado de Items para jugar con el DOM</title>