Skip to content

Instantly share code, notes, and snippets.

@IoTeacher
Created February 16, 2026 07:24
Show Gist options
  • Select an option

  • Save IoTeacher/d60605e6b46f6ff03451ee967307096b to your computer and use it in GitHub Desktop.

Select an option

Save IoTeacher/d60605e6b46f6ff03451ee967307096b to your computer and use it in GitHub Desktop.
uso de GIST desde la terminal con $ temux

🚀 🔥 Versión PRO con GitHub CLI

gh gist create


🎯 Ventajas de usar gh

✔ Oficial de GitHub ✔ Autenticación segura ✔ No usa Ruby ✔ Soporta descripción ✔ Permite público / privado ✔ Se integra con repositorios


🖥 1️⃣ Instalación de GitHub CLI


🔹 Ubuntu Server ARM64

sudo apt install gh -y

Si no está disponible:

type -p curl >/dev/null || sudo apt install curl -y
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg

sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) \
signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] \
https://cli.github.com/packages stable main" \
| sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null

sudo apt update
sudo apt install gh -y

🔹 Termux

pkg install gh -y

🔐 2️⃣ Autenticación segura

gh auth login

Elegir:

  • GitHub.com
  • HTTPS
  • Login with web browser

O pegar token manualmente.

Verificar:

gh auth status

✨ 3️⃣ Probar creación manual de Gist

gh gist create holamundo.s --private --desc "ARM64 Hola Mundo"

Salida esperada:

https://gist.github.com/xxxxx

🖥 4️⃣ Integrar en tmux (VERSIÓN ULTRA PRO)

Editar:

nano ~/.tmux.conf

🔥 Configuración completa actualizada

# CTRL+1 → Ensamblar y linkear
bind -n C-1 run-shell "
as -o holamundo.o holamundo.s && \
ld -o holamundo holamundo.o && \
tmux display-message 'Compilación exitosa'
"

# CTRL+2 → Ejecutar
bind -n C-2 run-shell "./holamundo"

# CTRL+3 → Depurar con GEF
bind -n C-3 run-shell "
tmux split-window -h 'gdb ./holamundo'
"

# CTRL+4 → Subir a GitHub Gist usando gh (PRO)
bind -n C-4 run-shell "
FILE=holamundo.s;
if [ -f \$FILE ]; then
  DESC=\"ARM64 Practice - \$(date +%Y-%m-%d_%H:%M)\";
  URL=\$(gh gist create \$FILE --private --desc \"\$DESC\");
  echo \$URL | xclip -selection clipboard 2>/dev/null;
  tmux display-message \"Gist creado: \$URL\";
else
  tmux display-message \"Error: Archivo no encontrado\";
fi
"

# CTRL+5 → Grabar con asciinema
bind -n C-5 run-shell "asciinema rec"

Recargar:

tmux source-file ~/.tmux.conf

🧪 Flujo profesional via tmux tool

Tecla Acción
CTRL+1 Compilar
CTRL+2 Ejecutar
CTRL+3 Debug GEF
CTRL+4 Subir a GitHub Gist (gh)
CTRL+5 Grabar práctica

🔥 Extra Nivel Profesor

Si quieres que sea público:

gh gist create holamundo.s --public

Si quieres que abra navegador automáticamente:

gh gist create holamundo.s --private --web

Podemos hacer que CTRL+4 abra navegador en automático también 😎


🏁 Resultado

Ahora tu laboratorio ARM64 tiene:

  • Debug profesional (GEF)
  • Automatización con tmux
  • Publicación oficial con GitHub CLI
  • Grabación con asciinema
  • Copiado automático de URL

Esto ya es entorno tipo DevOps educativo 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment