Skip to content

Instantly share code, notes, and snippets.

View lazarok09's full-sized avatar

Lazaro Souza lazarok09

View GitHub Profile
@lazarok09
lazarok09 / gist.ts
Last active September 2, 2025 13:40
This Gist demonstrates how to create type-safe DTOs for BullMQ jobs in TypeScript and validate them in Jest tests using Supertest
/*
This Gist demonstrates how to create type-safe DTOs for BullMQ jobs in TypeScript and validate them in Jest tests using Supertest.
By extending job payloads and responses with DTOs, you can ensure strong typing while testing your NestJS webhooks and background jobs.
The example shows how to:
Define a job DTO (SendMilionsOfEmailsDTO) and response DTO (SendMilionsOfEmailsResponseDTO).
Infer the correct job type from bullmq.Job.toJSON.
@lazarok09
lazarok09 / README.md
Created September 18, 2022 17:11 — forked from luizomf/README.md
Useful Linux/Unix commands.

Se você usa MacOS

O macOs roda sobre Darwin OS (kernel XNU), que é um sistema UNIX-like. Então, todos os comandos abaixo também funcionam normalmente no MacOS. Recomendo utilizar o gerenciador de pacotes homebrew caso necessário instalar algo. Se quiser o mesmo terminal que eu (ZSH com Oh My ZSH), utilize este vídeo para configurar https://youtu.be/bs1-Wxb_KIc

Se você usa Windows

No Windows é possível utilizar o wsl2 e instalar uma versão do linux para acompanhar. Eu fiz alguns vídeos para você usar o Linux no Windows.