Skip to content

Instantly share code, notes, and snippets.

View RuslanSevrukov's full-sized avatar

RuslanSevrukov RuslanSevrukov

View GitHub Profile
#Is the line of code below valid Ruby code? If so, what does it do? Explain your answer.
-> (a) {puts a}["Hello world"]
# #Write a function that sorts the keys in a hash by the length of the key as a string;
#should return ["abc", "4567", "another_key"]
hsh = { abc: 'hello', 'another_key' => 123, 4567 => 'third' }
hsh.sort_by { |key| key.to_s.length }
import React, {
useEffect,
memo,
useCallback,
useState,
useMemo,
} from ‘react’;
import { useDispatch, useSelector } from ‘react-redux’;
import ReactTooltip from ‘react-tooltip’;
import { debounce } from ‘lodash’;
import React from "react";
import PropTypes from "prop-types";
import cx from "classnames";
import { observer } from "mobx-react-lite";
import { get as mobxGet } from "mobx";
import filter from "lodash/fp/filter";
import get from "lodash/fp/get";
import getOr from "lodash/fp/getOr";
import groupBy from "lodash/fp/groupBy";
import mapValues from "lodash/fp/mapValues";