Skip to content

Instantly share code, notes, and snippets.

@leo020588
leo020588 / ruc-validacion.js
Last active May 10, 2024 18:33
Validación de RUC Perú
/**
* El número de RUC en el Perú ...
* - Tiene 11 dígitos
* - Puede comenzar con: 10, 20, 15 o 17
* - Usa el código de verificación Módulo 11 modificado
*
* https://conexiontributaria.blogspot.com/2011/10/que-es-la-sunat-que-es-el-ruc-que_9779.html
* https://es.wikipedia.org/wiki/Código_de_control#Módulo_11
* https://es.stackoverflow.com/questions/42957/cómo-validar-un-ruc-de-perú
*
@leo020588
leo020588 / debian-nginx-mariadb-php-nodejs.sh
Last active April 14, 2023 04:29
Debian: nginx, mariadb, php, composer, nodejs, cwebp
#!/bin/bash
sed -i 's/main/main contrib non-free/g' /etc/apt/sources.list
apt-get update && apt-get install -y curl gpg openssl p7zip zip unzip
# php and nginx repo
curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ bullseye main" | tee /etc/apt/sources.list.d/php.list
@leo020588
leo020588 / README.md
Last active July 11, 2023 21:07
Outline outline wiki setup
@leo020588
leo020588 / dom-utils.js
Last active August 24, 2022 17:20
Utility functions for DOM manipulation
/**
* https://gist.github.com/leo020588/7537e4f9ceff81d87d83b2ca3d5c3533
* Version: 1.1.0
* Updated: 2022-08-24
*/
(function ( window, document, classList, insertBefore, parentNode, replace ) {
// NODE CREATION -----------------------------------------------------------