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 python3 | |
| import json | |
| import sys | |
| import os | |
| import time | |
| import tracemalloc | |
| from collections import Counter | |
| from datetime import datetime | |
| def format_bytes(bytes_val): |
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 python3 | |
| """ | |
| High-performance parser for Anubis WAF logs. | |
| Designed for extreme speed and memory efficiency on huge log files. | |
| """ | |
| import sys | |
| import os | |
| import json | |
| import time |
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
| ##### function to add to .bashrc | |
| fcompose() { | |
| # Comando para extraer la ruta del YAML | |
| local GET_YAML_CMD="docker inspect {1} --format '{{ index .Config.Labels \"com.docker.compose.project.config_files\" }}'" | |
| # PREVIEW_CMD: Ahora incluye la RUTA al principio | |
| local PREVIEW_CMD="echo -e '\e[1;34m--- RUTA YAML ---\e[0m'; \ | |
| $GET_YAML_CMD; \ | |
| echo -e '\n\e[1;36m--- REDES ---\e[0m'; \ | |
| docker inspect {1} --format '{{range \$net, \$conf := .NetworkSettings.Networks}}- {{ \$net }} ({{ \$conf.IPAddress }}){{println}}{{end}}'; \ |
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 | |
| # Funci贸n para obtener la ruta del YAML | |
| get_compose_path() { | |
| local target=$1 | |
| docker inspect --format '{{ index .Config.Labels "com.docker.compose.project.config_files" }}' "$target" 2>/dev/null | |
| } | |
| if [ -z "$1" ]; then | |
| # PREVIEW_CMD con colores ajustados para visibilidad |
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
| /* | |
| C贸mo instalarlo | |
| Crea un nuevo marcador (Ctrl+D o Cmd+D) en la barra de favoritos de tu navegador. | |
| En el campo Nombre, ponle algo como "Descargar TXT". | |
| En el campo URL (o Direcci贸n), pega el siguiente c贸digo en una sola l铆nea (es el mismo de arriba, pero minificado para que el navegador lo acepte correctamente): | |
| */ | |
| javascript:(function(){const t=document.querySelector('textarea');if(!t||!t.value){alert('No hay textarea con contenido');return}const b=new Blob([t.value],{type:'text/plain'}),e=document.createElement('a');e.href=URL.createObjectURL(b);e.download='archivo.txt';document.body.appendChild(e);e.click();document.body.removeChild(e);URL.revokeObjectURL(e.href);})(); |
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 | |
| # 1. Buscamos todos los archivos 'compose.yaml' desde el directorio actual | |
| # 2. Los pasamos a fzf para generar el men煤 interactivo | |
| # 3. Guardamos la selecci贸n en una variable | |
| SELECCION=$(find "/datos/docker/dockge/dockers2" -type f -name "compose.yaml" | fzf --height 40% --reverse --header "Selecciona un archivo para Lazydocker") | |
| # 4. Verificamos si el usuario seleccion贸 algo (o si cancel贸 con ESC) | |
| if [ -n "$SELECCION" ]; then | |
| echo "Abriendo lazydocker con: $SELECCION" |
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 rust-script | |
| ### Help: rust-script nombre_del_script.rs --help | |
| //! ```cargo | |
| //! [dependencies] | |
| //! reqwest = { version = "0.11", features = ["blocking", "json"] } | |
| //! serde_json = "1.0" | |
| //! indicatif = "0.17" | |
| //! clap = { version = "4.0", features = ["derive"] } | |
| //! ``` |
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
| tar cfz algo.tar.gz --exclude='node_modules/*' . | |
| #backup de todo el directorio | |
| curl bashupload.com -T algo.tar.gz | |
| #upload a bashupload.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
| services: | |
| n8n: | |
| stdin_open: true | |
| tty: true | |
| container_name: n8n | |
| ports: | |
| - 5678:5678 | |
| volumes: | |
| - n8n_data:/home/node/.n8n | |
| image: docker.n8n.io/n8nio/n8n |
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
| services: | |
| n8n: | |
| stdin_open: true | |
| tty: true | |
| container_name: n8n | |
| ports: | |
| - 5678:5678 | |
| volumes: | |
| - n8n_data:/home/node/.n8n | |
| image: docker.n8n.io/n8nio/n8n |
NewerOlder