Skip to content

Instantly share code, notes, and snippets.

@readyyyk
readyyyk / regex.js
Last active July 11, 2024 18:11
BY number check regex
const phoneBYRegex = /^\+375 ?(\d{2}|\(\d{2}\)) ?\d{3}[- ]?\d{2}[- ]?\d{2}$/;
module.exports = phoneBYRegex;
@readyyyk
readyyyk / shuffle.js
Created September 30, 2023 17:23
Shuffle JS
const shuffle=(s)=>s.split('').sort(_=>0.5-Math.random()).join('');
@readyyyk
readyyyk / task.js
Created September 30, 2023 19:09
Task
/*
@readyyyk
Write a function that finds way from point "FORM" to point "TO"
function takes 3 args -
- point "from"
- point "to"
- function "getPaths" that returns places that can be reached from provided point
@readyyyk
readyyyk / tags-select.sql
Created February 12, 2024 16:39
select with tags
SELECT
"transactions"."id",
"transactions"."is_income",
"transactions"."amount",
"transactions"."currency",
"transactions"."description",
"transactions"."createdAt",
GROUP_CONCAT ("tags"."text") AS "tags"
FROM
"transactions"

AC - already created

MB - make better

  1. AC Dynamic API-keys (access-refres key rotation)
  2. AC System for managing timeout for lamda (already implemented)
  3. MB M-Log (centralized logging system).
    • Introduce high-level API & SDKs for logging to centralized system
  4. AC Store all updates and updated data in KV-store and batch update primary DB (Already implemented - db cache)
/** @param {string} data */
function make(data) {
let str = data
.split("\n")
.filter(line => line.trim() !== "")
.join("\n");
str = str.replaceAll("}", "");
str = str.replaceAll(/[\t ]*interface (\w+) \{/g, "@typedef {Object} $1");
str = str.replaceAll(/[\t ]*type (\w+) = \{/g, "@typedef {Object} $1");

Если вы снижаете оценку - добавьте поле Комментарий после оценки. Например:

| Критерий         |   Макс.   | Моя оценка | Комментарий            |
|------------------|:---------:|:----------:|------------------------|
| Стать счастливым | 5 баллов. |     4      | У тебя еще нет оффера! |

Review