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
| # Install Prometheus and NodeExporter | |
| sudo apt install prometheus | |
| # Start and enable Prometheus service | |
| systemctl daemon-reload | |
| systemctl start prometheus.service | |
| systemctl enable prometheus.service | |
| # Install Grafana | |
| sudo apt-get install -y apt-transport-https |
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
| import openai # pip install openai | |
| import typer # pip install "typer[all]" | |
| from rich import print # pip install rich | |
| from rich.table import Table | |
| """ | |
| Webs de interés: | |
| - Módulo OpenAI: https://github.com/openai/openai-python | |
| - Documentación API ChatGPT: https://platform.openai.com/docs/api-reference/chat | |
| - Typer: https://typer.tiangolo.com |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |