Skip to content

Instantly share code, notes, and snippets.

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

Sebastián Schuchhardt Schuchhardt

🏠
Working from home
View GitHub Profile
@lgaticaq
lgaticaq / dni_peru_validate.js
Last active May 17, 2022 19:19
Función para validar DNI Peruano
/**
* Verifica que un DNI de Perú sea valido
* @param {String} data DNI
* @returns {Boolean}
*/
const validate = data => {
const dni = data.replace('-', '').trim().toUpperCase()
if (!dni || dni.length < 9) return false
const multiples = [3, 2, 7, 6, 5, 4, 3, 2]
const dcontrols = {
@SeriouslyAwesome
SeriouslyAwesome / Gemfile
Last active April 1, 2024 20:50 — forked from tylerhunt/Gemfile
ActiveAdmin association autocomplete without complicated plugins.
gem 'active_model_serializers'
gem 'activeadmin'
gem 'jquery-ui-rails'