This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ======================================== | |
# SCRIPT DE LABORATORIO: SERVIDOR DHCP CON PODMAN | |
# Arquitectura: Servidor (2 interfaces: NAT + red interna) | |
# Cliente (1 interfaz: solo red interna, sin internet) | |
# ======================================== | |
# Limpiar todo | |
echo "Limpiando contenedores, imágenes y redes existentes..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Pedir la hora al usuario | |
read -p "Introduce la hora para empezar la cuenta atrás (HH:MM): " target_time | |
# Validar formato HH:MM | |
if ! [[ $target_time =~ ^([01]?[0-9]|2[0-3]):[0-5][0-9]$ ]]; then | |
echo "Formato inválido. Usa HH:MM (ejemplo: 14:30)" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
touch f1 | |
git add f1 | |
git commit -m "c 1 en master" | |
touch f2 | |
git add f2 | |
git commit -m "c 2 en master" | |
git checkout -b feature | |
git checkout master | |
touch f3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git init | |
touch f1 | |
git add f1 | |
git commit -m "c 1 en master" | |
touch f2 | |
git add f2 | |
git commit -m "c 2 en master" | |
git checkout -b feature | |
git checkout master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir con_historial_sucio_scripteado_merge_nocommit | |
cd con_historial_sucio_scripteado_merge_nocommit | |
git init | |
touch f1 | |
git add f1 | |
git commit -m "c 1 en main" | |
touch f2 | |
git add f2 | |
git commit -m "c 2 en main" | |
git checkout -b feature |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir 17 | |
cd 17 | |
touch f1 | |
git add f1 | |
git commit -m "c 1 en master" | |
touch f2 | |
git add f2 | |
git commit -m "c 2 en master" | |
git checkout -b feature | |
git checkout master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir 16 | |
cd 16 | |
git init | |
touch f1 | |
git add f1 | |
git commit -m "c 1 en master" | |
touch f2 | |
git add f2 | |
git commit -m "c 2 en master" | |
touch f3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
precomposeunicode = true | |
[remote "origin"] | |
url = git@github.com:usuario/nombre-del-repo.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
# Obtiene la ruta absoluta del script de bash en ejecución | |
script_directory="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | |
echo $script_directory | |
# El script de Python como una cadena de texto | |
python_script=' | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
du -h -d 1 "$(pip -V | cut -d ' ' -f 4 | sed 's/pip//g')" | grep -vE "dist-info|_distutils_hack|__pycache__" | sort -h |
NewerOlder