Skip to content

Instantly share code, notes, and snippets.

View jhon0010's full-sized avatar
🎯
Focusing

Jhon Lotero jhon0010

🎯
Focusing
View GitHub Profile
import { createParamDecorator, ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
export const CurrentUserToken = createParamDecorator((data, context: ExecutionContext) => {
const ctx = GqlExecutionContext.create(context).getContext();
const authHeader: string = ctx.headers.authorization;
return authHeader.replace('Bearer ', '');
});
export enum AuthChannel {
SMS = 'SMS',
WHATSAPP = 'WHATSAPP'
}
registerEnumType(AuthChannel, {
name: 'AuthChannel'
});
let text = `RégExr was created á by gskinner.com, and is proudly hosted by Media Temple.
capture groups. Explain describes your expression in plain English.`;
let regex: RegExp = /^([A-Za-z0-9áéíóú]+(\s|\.|\,)*)+$/g;
console.log(`${regex.test(text)}`);
@jhon0010
jhon0010 / .block
Last active March 23, 2017 14:33
Line Chart
license: mit
@jhon0010
jhon0010 / .block
Created March 23, 2017 14:15
Line Chart
license: mit
@jhon0010
jhon0010 / .block
Created March 23, 2017 14:12
Simple line chart
license: mit
@jhon0010
jhon0010 / .block
Last active March 23, 2017 14:05
Line Chart
license: gpl-3.0
@jhon0010
jhon0010 / .block
Last active December 3, 2016 17:52
Parallel Coordinates - Colombia Cinema
license: mit
@jhon0010
jhon0010 / .block
Last active November 12, 2016 22:09
fresh block
license: mit
@jhon0010
jhon0010 / .block
Last active September 7, 2016 03:41
notasEstudiantes
license: mit