Skip to content

Instantly share code, notes, and snippets.

View sergio9508's full-sized avatar
🏠
Working from home

Sergio Gil sergio9508

🏠
Working from home
View GitHub Profile
POSTGRES_DB=keycloak_db
POSTGRES_USER=keycloak_db_user
POSTGRES_PASSWORD=keycloak_db_user_password
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=password
PGADMIN_DEFAULT_EMAIL=[email protected]
PGADMIN_DEFAULT_PASSWORD=SuperSecret
@sergio9508
sergio9508 / NumeroALetras.js
Created June 14, 2024 20:10 — forked from wisusdev/NumeroALetras.js
Convierte números a texto con javascript
function Unidades(num){
switch(num)
{
case 1: return "UN";
case 2: return "DOS";
case 3: return "TRES";
case 4: return "CUATRO";
case 5: return "CINCO";
case 6: return "SEIS";
@sergio9508
sergio9508 / .cs
Created September 25, 2023 22:21
Convert PDF base 64 to image base64
static List<string> ConvertPdfToImages(string documento)
{
var images = Conversion.ToImages(documento, null, 150);
var result = new List<string>();
foreach (var image in images)
{
SKImage imagen = SKImage.FromPixels(image.PeekPixels());
SKData encoded = imagen.Encode();
Stream stream = encoded.AsStream();
@sergio9508
sergio9508 / isDui.js
Created May 19, 2022 20:08 — forked from gmelendezcr/isDui.js
Verificacion DUI
/*
DUI = 00016297-5
Posiciones -> 9 8 7 6 5 4 3 2
DUI -> 0 0 0 1 6 2 9 7
DV = 5
sum: (9*0) + (8*0) + (7*0) + (6*1) + (5*6) + (4*2) + (3*9) + (2*7) = 85
residuo: (85 % 10) = 5
resta: 10 - residuo = 5
.overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
transition: opacity 500ms;
visibility: hidden;
opacity: 0;