Skip to content

Instantly share code, notes, and snippets.

View Villanuevand's full-sized avatar
👋
Hola,

Andrés Villanueva Villanuevand

👋
Hola,
View GitHub Profile
@Villanuevand
Villanuevand / form-validation-pattern.component.ts
Created April 22, 2020 13:26 — forked from guillefd/form-validation-pattern.component.ts
Angular Form Validator Pattern: only letters and numbers
import { Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
@Component({
selector: 'form',
templateUrl: './form.component.html',
styleUrls: ['./form.component.scss']
})
export class Form {
@Villanuevand
Villanuevand / README:Firebase+Algolia.md
Created March 7, 2017 13:05
Firebase + Algolia Search Integration

Firebase + Algolia Search Integration

As easy as 6 files and < 200 lines of code.

@Villanuevand
Villanuevand / postal-codes.json
Created December 12, 2016 15:03 — forked from matthewbednarski/postal-codes.json
Global postal codes regex formats
[{ "Note": "The first two digits (ranging from 10–43) correspond to the province, while the last two digits correspond either to the city/delivery zone (range 01–50) or to the district/delivery zone (range 51–99). Afghanistan Postal code lookup", "Country": "Afghanistan", "ISO": "AF", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "With Finland, first two numbers are 22.", "Country": "Åland Islands", "ISO": "AX", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "Introduced in 2006, gradually implemented throughout 2007.", "Country": "Albania", "ISO": "AL", "Format": "NNNN", "Regex": "^\\d{4}$" }, { "Note": "First two as in ISO 3166-2:DZ", "Country": "Algeria", "ISO": "DZ", "Format": "NNNNN", "Regex": "^\\d{5}$" }, { "Note": "U.S. ZIP codes (range 96799)", "Country": "American Samoa", "ISO": "AS", "Format": "NNNNN (optionally NNNNN-NNNN or NNNNN-NNNNNN)", "Regex": "^\\d{5}(-{1}\\d{4,6})$" }, { "Note":
@Villanuevand
Villanuevand / vanilla-not-jquery.js
Created May 4, 2016 19:28 — forked from TexRx/vanilla-not-jquery.js
Pure JS alternatives to common CSS class jQuery functions
function hasClass(elem, className) {
return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' ');
}
function addClass(elem, className) {
if (!hasClass(elem, className)) {
elem.className += ' ' + className;
}
}
@Villanuevand
Villanuevand / readme.md
Created April 26, 2016 20:02 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser