This file contains 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 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 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 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 | |
source_host="[email protected]" | |
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 |
This file contains 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 | |
archi=$1 | |
t1=$2 | |
t2=$3 | |
linea=`grep -n "\[$2\]" $archi ` | |
#separador | |
IFS=':' | |
# Read the split words into an array |
This file contains 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
<?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/ |
This file contains 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
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" |
This file contains 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
<?php | |
$x = collect(Schema::getColumnListing('templatefields')) | |
->transform(function ($item, $key) { | |
return " | |
'" . $item ."'" | |
; | |
}) | |
->implode(","); | |
; |
This file contains 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 | |
## https://stackoverflow.com/questions/70915151/how-to-show-all-running-containers-created-by-docker-compose-globally-regardle | |
base='{{.Status}}\t{{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Ports}}\t{{.Networks}}\t{{.Mounts}}' | |
compose='{{.Label "com.docker.compose.project"}}\t{{.Label "com.docker.compose.service"}}' | |
docker container ls --all \ | |
--filter label=com.docker.compose.project \ | |
--format "table $compose\t$base" | |
This file contains 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
-- sql para generar todas las sqls necesarias para verificar los max y las sequencias de un postgresql 13 | |
select | |
'select '''|| sequencename || ''', max(id) , '|| last_value::text || ' as sec from ' || replace( sequencename , '_id_seq',' ; ') | |
from pg_sequences ; |
NewerOlder