Skip to content

Instantly share code, notes, and snippets.

View horaciod's full-sized avatar
💭
aprendiendo todo lo posible

Horacio Degiorgi horaciod

💭
aprendiendo todo lo posible
View GitHub Profile
#!/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"
@horaciod
horaciod / solr2.rs
Last active January 15, 2026 13:50
hace backup de un motor solr
#!/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"] }
//! ```
@horaciod
horaciod / backupandupload.sh
Created April 14, 2025 21:16
backup and upload desde terminal
tar cfz algo.tar.gz --exclude='node_modules/*' .
#backup de todo el directorio
curl bashupload.com -T algo.tar.gz
#upload a bashupload.com
@horaciod
horaciod / docker-compose.yml
Created February 27, 2025 16:26
docker para n8n
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
@horaciod
horaciod / docker-compose.yml
Created February 27, 2025 16:25
docker para n8n
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
#!/bin/bash
source_host="desarrollo@192.22.185.11"
source_dir="/disco2/backupspg/backups/basededatos"
target_dir="."
#obtiene el ultimo archivo del server remoto
last_backup=$(ssh ${source_host} "find ${source_dir} -type f -printf '%T@ %p\n' | sort -k1,1nr | head -1 |cut -d' ' -f2-")
if [ "${last_backup}" == "" ]; then
@horaciod
horaciod / entre.sh
Created May 22, 2024 14:37
Extrae las lineas entre dos palabras ingresadas entrepalabras.sh archivo.txt p1 p2
#! /bin/bash
archi=$1
t1=$2
t2=$3
linea=`grep -n "\[$2\]" $archi `
#separador
IFS=':'
# Read the split words into an array
@horaciod
horaciod / tracy.php
Created May 20, 2024 21:24
tracy.php
<?php
$desarrollolocal = true;
Tracy\Debugger::$maxDepth = 10;
Tracy\Debugger::$maxLength = 4000;
//die(Tracy\Debugger::$editor) ;
Tracy\Debugger::$dumpTheme = 'dark';
Tracy\Debugger::$productionMode = false;
Tracy\Debugger::$showLocation = true;
//vscode-remote/ssh-remote+myhost/
@horaciod
horaciod / entorno.kdl
Created January 16, 2024 14:55
entorno zellij para laravel , serve, npm y logs, arrancar con zellij --layout entorno.kdl
layout {
pane split_direction="horizontal" {
pane command="php" {
args "artisan" "serve"
}
pane command="npm" {
args "run" "dev"
}
pane command="tail" {
args "-f" "storage/logs/laravel.log"
@horaciod
horaciod / getcolumns-table-as-array-laravel.php
Created January 15, 2024 02:50
laravel to get all the fields in a table as array (for $fillable ...)
<?php
$x = collect(Schema::getColumnListing('templatefields'))
->transform(function ($item, $key) {
return "
'" . $item ."'"
;
})
->implode(",");
;