This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
ConnectedSocket, | |
MessageBody, | |
OnGatewayConnection, | |
SubscribeMessage, | |
WebSocketGateway, | |
WebSocketServer, | |
} from '@nestjs/websockets'; | |
import { GameService } from './game.service'; | |
import type { Namespace, Socket } from 'socket.io'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import product | |
from string import digits | |
with open("wordlist.txt", "w") as file: | |
for secret in product(digits, repeat=4): | |
print(*secret, sep="", file=file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker engine | |
docker unix socket should be runnining on with approperiate permissions, root user and docker group | |
allow only authorized users to have the | |
tcp and unix can run in both mode | |
unix socket is more secure if private docker setup | |
expose tcp socket with authentication and tls certs | |
implement firewall plugin and configure it properly | |
# in container | |
do not give excesive capabilities or privileged access |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boJ9jbbUNNfktd78OOpsqOltutMc3MY1 | |
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9 | |
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK | |
pIwrPrtPN36QITSp3EQaw936yaFoFgAB | |
koReBOKuIDDepwhWk7jZC0RTdopnAYKh | |
DXjZPULLxYr17uwoI01bNLQbtFemEgo7 | |
HKBPTKQnIay4Fw76bEy8PVxKEDQRKTzs | |
cvX2JJa4CFALtqS87jk27qwqGhBM9plV | |
UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR | |
truKLdjsbJ5g7yyJ2X2R0o3a5HQJFuLk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
from threading import Thread | |
from queue import Queue | |
from zipfile import ZipFile, BadZipFile | |
from tempfile import mkdtemp | |
from blessings import Terminal | |
TMPDIR = mkdtemp() |
NewerOlder