This file contains hidden or 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 | |
# reset jetbrains ide evals v1.0.4 | |
OS_NAME=$(uname -s) | |
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode" | |
if [ "$OS_NAME" == "Darwin" ]; then | |
echo 'macOS:' | |
for PRD in $JB_PRODUCTS; do |
This file contains hidden or 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=5 | |
indicator("EMAs", shorttitle="EMA", overlay=true) | |
// Plot 100H4 EMA line | |
plot(request.security(syminfo.tickerid, '240', ta.ema(close, 100)), linewidth=1, color=color.gray, title='100H4', trackprice = true, show_last = 1) | |
// Plot 200H4 EMA | |
plot(request.security(syminfo.tickerid, '240', ta.ema(close, 200)), linewidth=1, color=color.gray, title='200H4', trackprice = true, show_last = 1) | |
// Plot 100D1 EMA |
This file contains hidden or 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
interface IMealCategory { | |
id: number | |
key: 'desert' | 'slow-cook' | 'breakfast' | 'protein' | |
} | |
const getMealCategoryBy = <T extends IMealCategory, K extends keyof IMealCategory>(mealCategories: T[], by: K) => { | |
return (value: T[K]) => { | |
return mealCategories.find((mealCategory) => { | |
return mealCategory[by] === value | |
}) |
This file contains hidden or 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 * as DialogPrimitive from '@radix-ui/react-dialog' | |
import CloseIcon from 'components/icons/CloseIcon' | |
import React from 'react' | |
const classes = { | |
overlay: /* tw: */ `fixed inset-0 bg-black/30 rdx-state-open:animate-fade-in rdx-state-closed:animate-fade-out`, | |
content: /* tw: */ `fixed left-1/2 top-1/2 -translate-y-1/2 -translate-x-1/2 w-[calc(100%-40px)] h-[calc(100%-40px)] md:h-auto max-w-[900px] overflow-hidden rounded-md drop-shadow-card bg-white outline-none rdx-state-open:animate-fade-in rdx-state-closed:animate-fade-out` | |
} | |
type DialogProps = { |
This file contains hidden or 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 { EExperimentVersion } from '@/types' | |
import ProductCardA, { type IProductCardAProps } from './ProductCardA' | |
import ProductCardC, { type IProductCardCProps } from './ProductCardC' | |
type PropsVariantA = { | |
variant?: Extract<keyof typeof EExperimentVersion, 'a'> | |
} & IProductCardAProps | |
type PropsVariantC = { |
This file contains hidden or 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, { ReactNode } from 'react' | |
type CardProps = { | |
children: React.ReactNode | |
} | |
const Slots = { | |
image: null, | |
title: null, | |
content: null, |
This file contains hidden or 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 cn from 'classnames' | |
import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react' | |
import React, { useCallback, useContext, useEffect, useState } from 'react' | |
import { NextButton, PrevButton } from './CarouselButtons' | |
const Context = React.createContext<{ | |
emblaRef: UseEmblaCarouselType[0] | |
thumbRef: UseEmblaCarouselType[0] |
This file contains hidden or 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
/** | |
* @deprecated Use the new {@see [Tooltip](../common/Tooltip/Tooltip.tsx)} component instead. | |
*/ |
This file contains hidden or 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
# .vscode/launch.json | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "attach", | |
"name": "Launch Program", | |
"skipFiles": ["<node_internals>/**"], |
This file contains hidden or 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 request = require("request"); | |
const baseUrl = "https://jsonmock.hackerrank.com/api/football_matches"; | |
async function myReq(url) { | |
return new Promise((resolve) => { | |
request.get(url.toString(), (err, response, body) => { | |
const data = JSON.parse(body); | |
resolve(data); | |
}); |
NewerOlder