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 ; |
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
-- Teniendo una columna activida con el texto | |
-- Se ha validado la tapa de OLESID060417 con el archivo https://bibliotecas.uncuyo.edu.ar/sig/catalogo/editor/tapa/tapaurl. | |
-- se puede obtener solo el código con la siguiente sql | |
select substring (actividad, length('Se ha validado la tapa de '), | |
position(' ' in replace(actividad, 'Se ha validado la tapa de ', | |
''))), | |
actividad | |
from "logueo" | |
where actividad like 'Se ha validado la tapa de%' |
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
SELECT setval(‘table_id_seq’, (SELECT MAX(id) FROM table)); |
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 | |
num=10 | |
short=0 | |
timestyle='--time-style=locale' | |
#"+%d-%b-%Y%H:%M:%S "' | |
## number of files to print | |
## set to 1 for short listing | |
## GNU-specific time format | |
opts=Aadn:os |
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 | |
### llamar con la cantidad de segundos de espera entre captura y captura | |
sleep 3 | |
while true | |
do | |
gnome-screenshot -f /tmp/screen.png | |
fecha=`date +%Y-%m-%d\ %H:%M` | |
echo $fecha |
NewerOlder