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 { PrismaClient } from '@prisma/client'; | |
import { mockDeep, DeepMockProxy } from 'jest-mock-extended'; | |
import { PrismaService } from 'src/shared/services/prisma.service'; | |
type CreatePrismaProviderMockResponse = { | |
provide: typeof PrismaService; | |
useValue: DeepMockProxy<PrismaClient>; | |
}; |
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
export type MakePartial< | |
OriginalType, | |
KeyFromOriginalType extends keyof OriginalType, | |
> = Omit<OriginalType, KeyFromOriginalType> & | |
Partial<Pick<OriginalType, KeyFromOriginalType>>; | |
/* Here is how to use: */ | |
// type User = { | |
// name: string; | |
// age: number; |
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
"use strict"; | |
require("dotenv/config"); // Load environment variables from .env file | |
// 1. Table definition | |
const DynamoDB = require('aws-sdk/clients/dynamodb'); | |
const { Table } = require('dynamodb-toolbox'); | |
const DocumentClient = new DynamoDB.DocumentClient(); | |
const GLOBAL_SECONDARY_INDEX_NAME = '_et-pk-index'; |
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
version: '3' | |
services: | |
api: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
args: | |
http_proxy: "http://xxx.xx.xx.xxx:3128" | |
https_proxy: "http://xxx.xx.xx.xxx:3128" |
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
@font-face { | |
font-family: "JetBrains Mono Regular"; | |
src: url("https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/web/eot/JetBrainsMono-Regular.eot") | |
format("embedded-opentype"), | |
url("https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/web/woff2/JetBrainsMono-Regular.woff2") | |
format("woff2"), | |
url("https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/web/woff/JetBrainsMono-Regular.woff") | |
format("woff"), | |
url("https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/ttf/JetBrainsMono-Regular.ttf") | |
format("truetype"); |
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 python:3.9-alpine | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
COPY src src |
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 node:16-alpine | |
WORKDIR /app | |
COPY package*.json . | |
RUN npm install | |
COPY src src |
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
// curl -d '' -H "Content-Type: application/json" -X POST url | |
(async () => { | |
try { | |
const rawResponse = await fetch('url, { | |
method: 'POST', | |
headers: { | |
'Accept': 'application/json', |
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
/* eslint-disable import-helpers/order-imports */ | |
/* eslint-disable @typescript-eslint/no-var-requires */ | |
/* prerequisites: | |
- in the root of the project create the file in ./scripts/setupJsonServer.js | |
- json-server installed in the project or globally. | |
*/ | |
// to excute run "node .setupJsonServer.js" | |
// in package.json add following key value script: "dev:server": "node ./scripts/setupJsonServer.js" |
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
export default { | |
colors: { | |
primary: '#00bcd4', | |
secondary: '#ff9800', | |
tertiary: '#ff5722', | |
quaternary: '#9c27b0', | |
quinary: '#2196f3', | |
senary: '#009688', | |
white: '#ffffff', | |
black: '#000000', |
NewerOlder