Skip to content

Instantly share code, notes, and snippets.

View arielweinberger's full-sized avatar

Ariel Weinberger arielweinberger

View GitHub Profile
@arielweinberger
arielweinberger / strong-password-regex.md
Last active September 8, 2024 06:47
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]).*$/
@arielweinberger
arielweinberger / cloudSettings
Last active June 15, 2020 13:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-15T13:06:18.661Z","extensionVersion":"v3.4.3"}
@arielweinberger
arielweinberger / SQS Message Body
Created April 27, 2020 22:57
SQS Message Body
{"subject":"Test Mail using AWS SQS","body":"Test Body","recipient":"[email protected]"}
curl --location --request POST 'https://YOUR_AUTH0_DOMAIN/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=YOUR_AUTH0_CLIENT_ID' \
--data-urlencode 'username=YOUR_USERNAME' \
--data-urlencode 'password=YOUR_PASSWORD' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'scope=openid'
import {
NestInterceptor,
ExecutionContext,
Injectable,
CallHandler,
} from '@nestjs/common';
import { classToPlain } from 'class-transformer';
import { map } from 'rxjs/operators';
@Injectable()
### This gist is a part of the NestJS Zero to Hero course on Udemy.
### https://www.udemy.com/course/nestjs-zero-to-hero/?referralCode=F672C0C701844DC91F4D
To run PostgreSQL on Docker, run the following in your Terminal:
docker run --name postgres-nest -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres
When
[Case
(Deposit
(Role "serviceProvider")
(Role "customer")
(Token "" "")
(Constant 20)
)
(When
[Case
@arielweinberger
arielweinberger / gist:ab5d2fb1b4f760135da747bf0877a14e
Last active December 3, 2022 22:35
Sample ESLint output (with metadata)
This file has been truncated, but you can view the full file.
{
"results": [
{
"filePath": "/Users/arielweinberger/Development/phaser-defork/src/actions/AlignTo.js",
"messages": [],
"suppressedMessages": [],
"errorCount": 0,
"fatalErrorCount": 0,
"warningCount": 0,