@nestjs/core 12.1.3. A request-scoped factory logs req.user before a global guard assigns it.
npm install
npx tsx src/main.tsGET / prints:
| alias gpo='gp origin HEAD' | |
| alias gpof='gpo --force' | |
| alias gpot='gpo --delete' | |
| alias gcamd='gc --amend' | |
| alias gcaamd='gca --amend' | |
| alias gcmamd='gc --amend' | |
| alias gcamamd='gca --amend -m' |
| import { NestFactory } from '@nestjs/core'; | |
| import { AppModule } from './app.module'; | |
| import { FastifyAdapter, NestFastifyApplication } from '@nestjs/platform-fastify'; | |
| import { ValidationPipe } from '@nestjs/common'; | |
| import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; | |
| import { ConfigService } from '@nestjs/config'; | |
| async function bootstrap() { | |
| const app = await NestFactory.create<NestFastifyApplication>(AppModule, new FastifyAdapter()); | |
| app.useGlobalPipes(new ValidationPipe()); |
| function Test-AADUserLogin { | |
| <# | |
| .SYNOPSIS | |
| Checks the validity of Azure AD user logins by testing if they exist. | |
| .DESCRIPTION | |
| This function validates the existence of Azure AD user logins. | |
| It accepts email addresses either directly as a parameter or by reading them from a file. | |
| Each login is sent as a request to the Azure AD credential endpoint to check its existence. | |
| The function supports retrying failed requests for transient errors. |
| import { | |
| ConnectedSocket, | |
| MessageBody, | |
| OnGatewayConnection, | |
| SubscribeMessage, | |
| WebSocketGateway, | |
| WebSocketServer, | |
| } from '@nestjs/websockets'; | |
| import { GameService } from './game.service'; | |
| import type { Namespace, Socket } from 'socket.io'; |
| import { BadRequestException, InternalServerErrorException } from '@nestjs/common'; | |
| import { ValidateLengthPipe } from './validate-length.pipe'; | |
| import { faker } from '@faker-js/faker'; | |
| describe('ValidateLengthPipe', () => { | |
| it('should throw InternalServerErrorException on empty object', () => { | |
| expect(() => new ValidateLengthPipe({})).toThrow(InternalServerErrorException); | |
| }); | |
| it('should throw InternalServerErrorException when min < 0', () => { |
| Hello World |
| #!/bin/bash | |
| problem="" | |
| output_directory="." | |
| framerate=5 | |
| skip_simulation=false | |
| git_base=$(git rev-parse --show-toplevel) | |
| athenapk_exe="$git_base/build/bin/athenaPK" | |
| # Parse command-line arguments |
| message(STATUS "Configuring cmake for Arch-based distros") | |
| # Configure cuda install path | |
| set(CUDA_ROOT "/opt/cuda" CACHE FILEPATH "Locate cuda compiler and libraries") | |
| # Configure kokkos archtecture | |
| set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Enable cuda backend for Kokkos") | |
| set(GPU_DEVICE_ARCH "TURING75" CACHE STRING "GPU device architecture") | |
| set(Kokkos_ARCH_${GPU_DEVICE_ARCH} ON CACHE BOOL "Enable Kokkos optimizations for ${GPU_DEVICE_ARCH} architecture only") |
| import re | |
| import sys | |
| import subprocess | |
| import os | |
| import uuid | |
| from binascii import hexlify | |
| from concurrent.futures import ThreadPoolExecutor | |
| # check the required parameters in the argv list | |
| if len(sys.argv) < 4: |