Skip to content

Instantly share code, notes, and snippets.

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

Miguel Cobas mikecobas

🏠
Working from home
View GitHub Profile
@mikecobas
mikecobas / password-property-dto.ts
Created May 20, 2023 20:41 — forked from Klerith/password-property-dto.ts
Password validation - DTO
@IsString()
@MinLength(6)
@MaxLength(50)
@Matches(
/(?:(?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {
message: 'The password must have a Uppercase, lowercase letter and a number'
})
password: string;
@mikecobas
mikecobas / parse-jwt.js
Created August 13, 2021 05:32 — forked from Klerith/parse-jwt.js
Parse - JWT - Obtener Payload y fecha de creación y expiración
function parseJwt (token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
@mikecobas
mikecobas / cloudSettings
Last active September 8, 2020 23:43
keybase.md
{"lastUpload":"2020-09-08T23:43:41.740Z","extensionVersion":"v3.4.3"}