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 React, { useId, useMemo } from "react"; | |
export const DateTime = ( | |
props: { | |
date?: Date | null; | |
format: (date: Date) => string; | |
placeholder?: string; | |
} & React.HTMLAttributes<"span"> | |
) => { | |
const { format, date } = props; |
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
function setupWsProxy(server: http.Server) { | |
server.on('upgrade', (clientReq, clientSocket) => { | |
const req_ = http.request({ | |
port: remotePort, | |
host: remoteHost, | |
headers: clientReq.headers | |
}) | |
req_.end() | |
req_.on('upgrade', (remoteResponse, remoteSocket) => { |
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 { useMantineTheme } from "@mantine/core"; | |
import { | |
Canvas, | |
Group as FabricGroup, | |
Object as FabricObject, | |
Image, | |
Path, | |
PencilBrush, | |
Point, | |
} from "fabric"; |
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 @typescript-eslint/no-explicit-any */ | |
export const aroundMethodDecarator = ( | |
decoratorFn: ( | |
args: any[], | |
name: string | symbol, | |
next: (..._args: any[]) => any | |
) => any | |
): MethodDecorator => { | |
return (_target: any, _key: string | symbol, descriptor: PropertyDescriptor) => { | |
const originalMethod = descriptor.value; |
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 { motion, useSpring } from "framer-motion"; | |
import { | |
MouseEventHandler, | |
ReactEventHandler, | |
useCallback, | |
useEffect, | |
useRef, | |
useState, | |
} from "react"; |
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 { NgtscProgram, readConfiguration } from '@angular/compiler-cli'; | |
import { dirname, resolve } from 'path'; | |
import ts from 'typescript'; | |
import { fileURLToPath } from 'url'; | |
const __dirname = dirname(fileURLToPath(import.meta.url)); | |
const { options, rootNames } = readConfiguration( | |
resolve(__dirname, '..', 'tsconfig.angular.json') | |
); | |
const host = ts.createIncrementalCompilerHost(options); |
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
// environment: node and browser | |
import { parse, stringify } from "@brillout/json-s"; | |
import { useRef } from "react"; | |
import { | |
QueryClient, | |
QueryFunction, | |
QueryKey, | |
useQuery as useReactQuery, | |
useQueryClient, |
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
CAPTURE_AWS_REGION= | |
CAPTURE_AWS_ACCESS_KEY= | |
CAPTURE_AWS_SECRET_KEY= | |
CAPTURE_AWS_BUCKET= | |
CAPTURE_MEM_TRIGGER_MB=500 | |
CAPTURE_MEM_LIMIT_MB=1000 | |
CAPTURE_TIME_LIMIT_SEC=20 | |
import { S3 } from 'aws-sdk'; | |
import dotenv from 'dotenv'; |
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 'reflect-metadata'; | |
import * as LRU from 'lru-cache'; | |
import { from, isObservable } from 'rxjs'; | |
import { finalize, shareReplay, tap } from 'rxjs/operators'; | |
import { Md5 } from 'ts-md5/dist/md5'; | |
export const aroundMethodDecarator = ( | |
decoratorFn: ( | |
args: any[], | |
name: string, |