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 | |
// obtener el listado de funciones que llama un objeto llamado conn | |
// grep -or "conn->.*.(" >/tmp/llamadas.txt | |
$f = file_get_contents('/tmp/llamadas.txt'); | |
$lineas = explode("\n" , $f) ; | |
$aux = [ ]; | |
foreach($lineas as $l){ | |
if (strstr($l, 'vendor')===false) |
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 | |
tar czvf $1 `git diff --name-only` |
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 | |
input="dbclean/tablas_datos.txt" | |
n=$((0)) | |
while IFS= read -r line | |
do | |
((n++)) | |
nn=`printf '%03d' "$n"` | |
echo "Exportando $nn $line " |
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 | |
input="dbclean/tablas_datos.txt" | |
#el archivo tiene los nombres de las tablas con el esquema ej: biblio.usuarios | |
while IFS= read -r line | |
do | |
echo "Exportando $line" | |
docker exec -e PGPASSWORD=xxx sid21-db12 /usr/bin/pg_dump -Upostgres -hlocalhost siglocal2021 -a --inserts -t $line >dbclean/$line.sql | |
done < "$input" | |
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 | |
zenity --question --text="Are you sure, proceed to shutdown?" | |
if [ $? = 0 ]; then | |
sudo s2disk | |
else | |
exit | |
fi | |
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(to_timestamp(61 )); | |
1970-01-01 01:01:01+01 | |
---- Se me olvida siempre !!! |
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 | |
define('ADODB_OUTP', 'log_querys_to_ray'); | |
function log_querys_to_ray($msg) | |
{ | |
if (function_exists('ray')) { | |
$msg = strip_tags($msg); | |
ray($msg)->green(); |
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
CREATE OR REPLACE FUNCTION notify_table_update() | |
RETURNS TRIGGER | |
LANGUAGE PLPGSQL | |
AS | |
$$ | |
BEGIN | |
IF TG_OP = 'INSERT' THEN | |
PERFORM pg_notify( | |
'update_' || TG_TABLE_NAME, | |
'{"new":' || row_to_json(NEW)::text || '}' |
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 | |
namespace App\Http\Livewire; | |
// use Kdion4891\LaravelLivewireForms\FormComponent; | |
use Kdion4891\LaravelLivewireForms\Field; | |
use Kdion4891\LaravelLivewireForms\FormComponent; | |
class AcheFormComponent extends FormComponent { |
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 json_agg(t) | |
from (select id,name, institucion_id from users where tipo='informador' ) t \g informadores.json |