Skip to content

Instantly share code, notes, and snippets.

View carlos-mg89's full-sized avatar

Carlos Martínez Gadea carlos-mg89

View GitHub Profile
@carlos-mg89
carlos-mg89 / gist:4aaafa310c9e4b91f5fb890540f38cae
Created February 25, 2020 13:10
Spanish DNI, CIF, NIE validator
/**
* ValidateSpanishID. Returns the type of document and checks its validity.
*
* Usage:
* ValidateSpanishID( str );
*
* > ValidateSpanishID( '12345678Z' );
* // { type: 'dni', valid: true }
*
* > ValidateSpanishID( 'B83375575' );
@carlos-mg89
carlos-mg89 / gist:a3ef1bd71f277edd5783271796c4b466
Created September 30, 2019 11:36
keyboard_layout_es_installed.txt
// Modified for a real Spanish keyboard by Jon Tombs.
default partial alphanumeric_keys
xkb_symbols "basic" {
include "latin(type4)"
name[Group1]="Spanish";
key <AE01> { [ 1, exclam, bar, exclamdown ] };
@carlos-mg89
carlos-mg89 / gist:727244c4e73caab718f8c73d8ea3a745
Created September 30, 2019 11:27
keyboard_layout_es_live_cd.txt
cat /usr/share/X11/xkb/symbols/es
// Modified for a real Spanish keyboard by Jon Tombs.
default partial alphanumeric_keys
xkb_symbols "basic" {
include "latin(type4)"
name[Group1]="Spanish";
setxkbmap -v 10
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules: evdev
model: pc105
layout: es,us
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
CPU Family: 0x6
@carlos-mg89
carlos-mg89 / route.geojson
Created February 13, 2019 09:56
Generated GeoJson route with OSRM match API
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
CPU Family: 0x6