Skip to content

Instantly share code, notes, and snippets.

@akishkevich
akishkevich / strong-password-regex.md
Created September 1, 2020 19:06 — forked from arielweinberger/strong-password-regex.md
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
@akishkevich
akishkevich / margin_auto
Last active July 10, 2017 12:46
To quickly centre a block element without having to worry about if there is any top or bottom margin already applied.
@mixin push--auto {
margin: {
left: auto;
right: auto;
}
}