Skip to content

Instantly share code, notes, and snippets.

View iyobo's full-sized avatar
🦶
This is Github!

Iyobo Eki iyobo

🦶
This is Github!
View GitHub Profile
@fjavier
fjavier / jaro-winkler
Last active April 1, 2020 13:43
jaro-winkler postgres
create or replace function fn_porcentaje_similitud(cadena1 character varying, cadena2 character varying )
/*
@author: fbriceno
@descripcion: devuelve el porcentaje de similitud entre 2 cadenas, haciendo uso del algoritmo jaro-winkler
@return: porcentaje de similitud entre 0 y 1. entre mas cercano al 1 mayor coincidencia. mas cercano al 0 poco coincidente
@documentation: https://gist.github.com/fjavier/586c713943d76a023a70
*/
returns numeric as
$BODY$
DECLARE
@tspvivek
tspvivek / directus_mover.sh
Last active June 27, 2023 03:09
Directus postgres DB - Script to move schema changes between different servers without replacing data
#!/bin/sh
start=`date +%s.%N`
SRC_CONNECTION_STRING="postgresql://src_username:src_password@src_host/src_dbname"
DST_CONNECTION_STRING="postgresql://dst_username:dst_password@dst_host/dst_dbname"
rm src_schema.sql
rm src_data.sql
rm dst_data.sql