Skip to content

Instantly share code, notes, and snippets.

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

Jorge Vergara javebratt

🏠
Working from home
View GitHub Profile
@javebratt
javebratt / email-validator.ts
Last active September 1, 2017 11:24
Email Validator what works for NG2 and Ionic 2 apps.
import {FormControl} from '@angular/forms';
export class EmailValidator {
static isValid(control: FormControl){
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(control.value);
if (re){
return null;
@jdjuan
jdjuan / meta-regimen.md
Last active June 15, 2018 22:32
Meta Regimen: How to stick to your habits

Meta Regimen

Lessons I've learned throughout the years to keep up with my habits.

1. Motivate Yourself 💪

Nothing will make you skip your habits more than the lack of motivation

  • Believe you can
  • Watch motivational videos