Skip to content

Instantly share code, notes, and snippets.

View intelguasoft's full-sized avatar
👨‍🍳
Working from at Home...

Henry Díaz intelguasoft

👨‍🍳
Working from at Home...
View GitHub Profile
@alfchee
alfchee / NumeroALetras.js
Last active June 15, 2024 09:21
Código en JavaScript que convierte números a letras, bastante útil para formularios de documentos contables y similares
/*************************************************************/
// NumeroALetras
// The MIT License (MIT)
//
// Copyright (c) 2015 Luis Alfredo Chee
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@leonardofed
leonardofed / README.md
Last active June 17, 2024 14:54
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@intelguasoft
intelguasoft / parse-jwt.js
Created September 13, 2018 00:45
Parse - JWT - Obtener Payload y fecha de creación y expiración
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
@intelguasoft
intelguasoft / class.Database.inc
Created September 13, 2018 00:49
PHP: class.Database.inc
<?
// ======================================================
// Clase: class.Database.php
// Funcion: Se encarga del manejo con la base de datos
// Descripcion: Tiene varias funciones muy útiles para
// el manejo de registros.
//
// Ultima Modificación: 17 de marzo de 2015
// ======================================================
@kerren
kerren / default
Created September 22, 2018 15:38
The new nginx config for entroinfo.xyz after running certbot
server {
server_name www.entroinfo.xyz entroinfo.xyz;
location / {
proxy_pass http://localhost:3000;
}
listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/entroinfo.xyz/fullchain.pem; # managed by Certbot
@intelguasoft
intelguasoft / get_sheets.js
Created May 28, 2019 21:55
Metodo para obtener las hojas de un archivo de Excel y cargarlas en un elemento <select>.
/**
* Metodo para obtener las hojas de un archivo de Excel y cargarlas en un elemento <select>.
* Se utilizo la librería SheetJS para este ejemplo.
* Henry Díaz, <hnrdiaz@gmail.com>
**/
$('#input-excel').change(function(e) {
var reader = new FileReader();
let sheetNames;
reader.readAsArrayBuffer(e.target.files[0]);
@intelguasoft
intelguasoft / return_data_json.js
Created May 28, 2019 22:06
Metodo para procesar la data de una determinada hoja de un archivo de Excel y devolverla en formato JSON.
/**
* Metodo para procesar la data de una determinada hoja de un archivo de Excel y devolverla en formato JSON.
* Se utilizo la librería SheetJS para este ejemplo.
* Henry Díaz, <hnrdiaz@gmail.com>
**/
$('#btn-importar').on('click', function(e) {
e.preventDefault();
$('#movimiento').show();

Windows Forms: Como encriptar/desencritar la cadena de conexión en el archivo app.config usando C#

Esta nota te muestro cómo cifrar y descifrar la cadena de conexión en el archivo app.config en una aplicación de Windows Forms de C# .Net

Puede usar muchos algoritmos diferentes para cifrar y descifrar una cadena de texto. Sin embargo, dentro del alcance de este artículo, solo le muestro cómo usar el algoritmo TripleDes para cifrar y descifrar su cadena de conexión.

La cadena de conexión generalmente se almacena en app.config y rara vez se cifra. Si alguien abre el archivo app.config, verá la información de conexión del servidor de datos. Esto es muy peligroso si inician sesión en la base de datos para sabotear o editar datos sin usar software.

Por lo tanto, el cifrado de la cadena de conexión es esencial, le ayuda a proteger la información de conexión a la base de datos.

@claudiodekker
claudiodekker / v2gif.sh
Last active December 3, 2020 17:39
Simple command to turn videos into GIFs
#!/bin/bash
v2gif() {
# Based on https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/
ffmpeg=""
filter=""
palettegen="palettegen"
paletteuse="paletteuse"
while getopts "w:f:is:t:" opt; do
var http = require('http');
var path = require('path');
var fs = require('fs');
var AUDIOFILE = "./audio.ogg";
function serveWithRanges(request, response, content) {
var range = request.headers.range;
var total = content.length;
var parts = range.replace(/bytes=/, "").split("-");