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
[ | |
[ | |
[ | |
{ | |
"id": 1, | |
"title": "row 1" | |
} | |
] | |
], | |
[ |
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
{ | |
"firefox": { | |
"default": "57.0", | |
"versions": { | |
"57.0": { | |
"image": "selenoid/firefox:88.0", | |
"port": "4444", | |
"path": "/wd/hub" | |
} | |
} |
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
/** | |
* Simple object check. | |
* @param item | |
* @returns {boolean} | |
*/ | |
export function isObject(item) { | |
return (item && typeof item === 'object' && !Array.isArray(item)); | |
} | |
/** |
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
module.exports = { | |
"stories": [ | |
"../src/**/*.stories.mdx", | |
"../src/**/*.stories.@(js|jsx|ts|tsx)" | |
], | |
"addons": [ | |
"@storybook/addon-links", | |
"@storybook/addon-essentials", | |
"@storybook/addon-interactions", | |
"@storybook/preset-create-react-app" |
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 { Scalar, CustomScalar } from '@nestjs/graphql'; | |
import { Kind, ValueNode } from 'graphql'; | |
import { ObjectId } from 'mongodb'; | |
@Scalar('ObjectId') | |
export class ObjectIdScalar implements CustomScalar<string, ObjectId> { | |
description = '`Date`'; | |
parseLiteral(ast): ObjectId { | |
// check the type of received 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "pwa-node", | |
"request": "launch", | |
"name": "Debug Nest Framework", | |
"args": [ | |
"${workspaceFolder}/src/main.ts" | |
], |
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
const [path, setPath] = useState({}); | |
useEffect(() => { | |
if (file.name) { | |
fetchMyAPI(); | |
} | |
}, [file.name]); | |
async function fetchMyAPI() { | |
const res: any = await getSignedURL(file.name); | |
setPath(res); |
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 log(target:any, name:any, descriptor:any) { | |
const original = descriptor.value; | |
if (typeof original === 'function') { | |
descriptor.value = function(...args: any) { | |
console.log("Logged at: " + new Date().toLocaleString()); | |
console.log(args); | |
console.log(name); | |
console.log(target); | |
try { | |
const result = original.apply(this, args); |
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, { useEffect, useImperativeHandle, useRef, useState } from 'react'; | |
import classNames from 'classnames'; | |
import Icon from '../../Icon'; | |
import { filter, find, remove } from 'lodash'; | |
import { usePopper } from 'react-popper'; | |
export type OptionProps = { | |
label?: string; | |
value?: string; | |
}; |
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
const AWS = require('aws-sdk'); | |
const SSM = new AWS.SSM(); | |
const fs = require('fs'); | |
let Client = require('ssh2-sftp-client'); | |
function clean(obj) { | |
for (var propName in obj) { | |
if (obj[propName] === null || obj[propName] === undefined) { | |
delete obj[propName]; | |
} |
NewerOlder