This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const twilio = require('twilio'); | |
const accountSid = 'YOUR_SID_TWILIO'; // Your Account SID from www.twilio.com/console | |
const authToken = 'YOUR_TOKEN_TWILIO'; // Your Auth Token from www.twilio.com/console | |
const client = new twilio(accountSid, authToken); | |
const createSMS = () => { | |
client.messages.create({ | |
body: 'Hola !! Subscribete y comparte! ', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class LoginComponent implements OnInit { | |
public form: FormGroup; | |
constructor(private fb: FormBuilder, private loginSService: LoginSService, | |
private cookieService: CookieService) { | |
} | |
ngOnInit(): void { | |
this.form = this.fb.group({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Directive, Input, OnInit, TemplateRef, ViewContainerRef} from '@angular/core'; | |
import {RoleUser} from './app.component'; | |
import {UserService} from './user.service'; | |
@Directive({ | |
selector: '[appRole]' | |
}) | |
export class RoleDirective implements OnInit { | |
private currentUser: RoleUser; | |
private permissions = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from '@angular/core'; | |
import { | |
HttpRequest, | |
HttpHandler, | |
HttpEvent, | |
HttpInterceptor, HttpErrorResponse | |
} from '@angular/common/http'; | |
import {Observable, throwError} from 'rxjs'; | |
import {CookieService} from "ngx-cookie-service"; | |
import {catchError} from "rxjs/operators"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from '@angular/core'; | |
import { | |
HttpRequest, | |
HttpHandler, | |
HttpEvent, | |
HttpInterceptor | |
} from '@angular/common/http'; | |
import {Observable} from 'rxjs'; | |
import {CookieService} from "ngx-cookie-service"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { | |
HttpRequest, | |
HttpHandler, | |
HttpEvent, | |
HttpInterceptor | |
} from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
@Injectable() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"text": "Comienza la aventura de mi vida. Nunca había salido de mi país, y toca dar el gran paso. Emociones mezcladas. Alegrías y tristezas. Comienzo el viaje hacia la ciudad de San Antonio del Táchira (Venezuela), con maleta en mano y atravesando el puente internacional Simón Bolívar. Hago el proceso de migraciones y sello mi pasaporte. Una vez en la ciudad de Cúcuta (Colombia), gente amable me indica que camioneta tomar hacia el aeropuerto Camilo daza. Con un boleto a la ciudad de Bogotá, una espera de cinco horas y conexión a internet, logro adelantar parte de mi trabajo del proyecto que tenía pendiente. En esta nueva ciudad, el ambiente es otro, más profesional. Aprovecho la enorme oportunidad y visito a uno de mis cliente con el que trabajado en varias oportunidades de forma satisfactoria. Ya instalado en Bogotá, nuevos proyectos y admistades he conseguido. El concepto del freelance ha empezado a materializarse, ya no veo limites en esta aventura. Puede seguir y no detenerse, como dice el pa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from '@angular/core'; | |
import { | |
ActivatedRouteSnapshot, | |
CanLoad, | |
Route, RouterStateSnapshot, | |
UrlSegment, | |
} from '@angular/router'; | |
import {Observable} from 'rxjs'; | |
import {RestService} from '../services/rest/rest.service'; | |
import {CookieService} from 'ngx-cookie-service'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Se debe obtener la fecha en formato YYYY/MM/DD muy importante usar '/' para separar | |
const start = moment.utc('2020-07-13T14:04:45.098Z').format('YYYY/MM/DD') // 2020/07/13 | |
// Luego se debe volver a parsear indicando los '/' | |
moment(start, 'YYYY/MM/DD').toDate() //2020/07/13 :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (environment.production) { | |
enableProdMode(); | |
if (window) { | |
window.console.log = window.console.warn = window.console.info = function () { | |
// Don't log anything. | |
}; | |
const w = window as any; | |
window.console.error = function ($event, more) { | |
console.log(' 😠 ERROR', more) |