Skip to content

Instantly share code, notes, and snippets.

View rasputino's full-sized avatar

P. León rasputino

View GitHub Profile
@rasputino
rasputino / CorregirProblemaConfiguradorFnmtUbuntu.md
Created October 30, 2023 15:27
Corregir problema instalando configurador de la FNMT en ubuntu linux

Si aparece este problema:

$ sudo dpkg -i configuradorfnmt_4.0.2_amd64.deb
(Leyendo la base de datos ... 564171 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar configuradorfnmt_4.0.2_amd64.deb ...
Desempaquetando configuradorfnmt (4.0.2) sobre (4.0.2) ... 
Configurando configuradorfnmt (4.0.2) ... 
Ha ocurrido un error durante la instalacion, no se ha encontrado el fichero $APP_DIR/configuradorfnmt.js 
Ha ocurrido un error durante la instalacion, no se ha encontrado el JRE empotrado 

Procesando disparadores para gnome-menus (3.36.0-1ubuntu3) ...

<?xml version='1.0' encoding='UTF-8' ?>
<!-- Schema for the SOAP/1.1 encoding
Portions © 2001 DevelopMentor.
© 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
This document is governed by the W3C Software License [1] as described in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
This file has been truncated, but you can view the full file.
INSERT INTO callejero.unidadpoblacional (cpro,cmum,cun,tipoinf,cdev,fvar,cvar,nmun,dmun50,nmunc,nentco,nentco50,nentcoc,nentsic,nentsi50,nentsic2,nnucle,nnucle50,nnuclec) VALUES
('01','001','0000000',' ',' ','20190630',' ',' ','ALEGRÍA-DULANTZI ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '),
('01','002','0000000',' ',' ','20190630',' ',' ','AMURRIO ','
INSERT INTO callejero.provincia (cpro,descripcion) VALUES
('01','ARABA/ALAVA'),
('02','ALBACETE'),
('03','ALICANTE'),
('04','ALMERIA'),
('05','AVILA'),
('06','BADAJOZ'),
('07','I. BALEARS'),
('08','BARCELONA'),
('09','BURGOS'),
@rasputino
rasputino / CalculoCodigoINE.cs
Last active October 7, 2021 09:13
Cálculo del código de control del INE en C#
var codigo = 66108;//España
//Cálculo de código de control del INE
var A = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
var B = new int[] { 0, 3, 8, 2, 7, 4, 1, 5, 9, 6 };
var C = new int[] { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9};
codigo = Convert.ToInt32(codigo.ToString().Reverse().Aggregate(0, (b, x) => 10 * b + x - '0'));
var columna = 0;
var sum = 0;
@rasputino
rasputino / PaisesIne.sql
Last active January 11, 2022 08:44
Códigos nacionalidades INE
CREATE TABLE public.paises (
cpk_pais character(6) NOT NULL,
cdescpais character varying(30) NOT NULL
);
INSERT INTO public.paises VALUES ('661012','Albania');
INSERT INTO public.paises VALUES ('661027','Austria');
INSERT INTO public.paises VALUES ('661033','Bélgica');
INSERT INTO public.paises VALUES ('661048','Bulgaria');
INSERT INTO public.paises VALUES ('661051','CHECOSLOVAQUIA');
@rasputino
rasputino / ValidacionesNIF.cs
Last active August 30, 2024 09:47
Validación NIF/CIF/NIE
using System;
using System.Text.RegularExpressions;
using System.Linq;
using System.Collections;
namespace FactuGrafic.Nucleo.Clases
{
public static class ValidacionesNIF
{