Skip to content

Instantly share code, notes, and snippets.

View mgregier's full-sized avatar

Marcin mgregier

View GitHub Profile
@mgregier
mgregier / allowed-service-accounts.decorator.ts
Last active January 22, 2025 22:43
Allowed GCP service account NestJS Guard
import { SetMetadata } from '@nestjs/common';
import { SERVICE_ACCOUNT_KEY } from './google-auth.guard';
export const AllowedServiceAccounts = (...accounts: string[]) =>
SetMetadata(SERVICE_ACCOUNT_KEY, accounts);
@mgregier
mgregier / System Design.md
Created May 25, 2022 14:16 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?