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
@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
{
"type": "Polygon",
"coordinates": [
[
[
-84.3442667,
10.0833093
],
[
-84.3458647,
{
"type": "Polygon",
"coordinates": [
[
[
-84.3576587,
10.0950893
],
[
{
"type": "Polygon",
"coordinates": [
[
[
-84.044369,
9.888811
],
[
-84.041730,
<?/*
Template Name: post collection
Template Post Type: post, collection
*/ ?>
<?php get_header(); ?>
<?php wp_enqueue_style('post-style-css', get_template_directory_uri() . '/css/post-style.css') ?>
<?php
if (get_field('banner-img')) : $banner = get_field('banner-img'); ?>
<section class="banner-section banner-padding">
<label class="credits-lb"> Fotografía: <?php echo get_field('banner-credits'); ?></label>
.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;
#
class ResetMailer < Devise::Mailer
helper :application
include Devise::Controllers::UrlHelpers
default template_path: 'devise/mailer'
layout 'password_reset'
def reset_password_instructions(record, token, opts={})
@token = token
delivery_options = {