Skip to content

Instantly share code, notes, and snippets.

View htndev's full-sized avatar
💭
400 Bad repositories.

Oleksandr Vanilchuk htndev

💭
400 Bad repositories.
View GitHub Profile
{
"info": {
"title": "Threshold Internal API",
"description": "The API is exclusively for internal purposes",
"version": "1.0.0"
},
"openapi": "3.0.3",
"servers": [
{
"url": "/internal"
const fibanachi = (min, max) => Array(max - min).fill(0)
.reduce((acc, _, index) => [...acc, ...(!index ? [min] : (index !== max - min - 1 ? [acc[index - 1] + 1] : [acc[index - 1] + 1, max])) ], [])
.reduce((acc, num, index) => [...acc, !index ? num : acc[index - 1] + num], []);
console.log(fibanachi(10, 13));
const compose = (...fns) => (value) =>
fns.reduceRight((acc, fn) => fn(acc), value);
Math.sqrt(Math.round(parseFloat("143.7")));
const sqrtUltra = compose(
(value) => `We earned: ${value}`,
(value) => value ** 3,
Math.sqrt,
Math.round,
// ES5
function generateTemplate(template) {
const NAME_PLACEHOLDER = "{{ name }}";
const GREETING_PLACEHOLDER = "{{ greeting }}";
return function (greeting) {
return function (name) {
return template
.replace(GREETING_PLACEHOLDER, greeting)
.replace(NAME_PLACEHOLDER, name);
const mockStyle = {
get transform() {
return 'translateX(0) translateY(10px)';
}
};
const buildRegex = (type: 'X' | 'Y'): RegExp =>
new RegExp(`translate${type}\(\\S*\)`);
const buildTranslate = (
section.section.faq
+accordeon('Часто задаваемые вопросы', 'Возможно, наши клиенты уже задали интересующий вас вопрос',
[
{
title: 'Это больно?',
body : 'Конечно. Вы можете воспользоваться услугой обработки диабетической стопы. Перед процедурой мы проводим 4 простых теста на чувствительность: вибрационную, температурную, болевую и тактильную. Если чувствительность нарушена, мы обращаем внимание на эти участки стопы и обрабатываем их с особой осторожностью. Также мы измеряем уровень сахара в крови с помощью аппарата глюкометр. Это не больно и полностью безопасно. Если уровень сахара выше 10, мы не имеем права прикасаться к стопе. Поэтому мы попросим вас снизить уровень глюкозы в крови и запишем на новое удобное время.'
},
{
title: 'У меня сахарный диабет. Я могу пойти к подологу?',
body : 'Конечно. Вы можете воспользоваться услугой обработки диабетической стопы. Перед процедурой мы проводим 4 простых теста на чувствительность: вибрационную, температурную,
mixin accordeon(header, description, items, expandedRequired, expandedIndex)
.container
h2.white-text.text-center.mb-3= header
p.h4-title.text-center.d-none.d-md-block.mb-5= description
#accordion.accordion.mt-3
if expandedRequired
each item, index in items
if index === expandedIndex
.card-header.active(data-toggle='collapse', data-target='#collapse' + index, aria-controls='collapse' + index, aria-expanded='true' id="header" + index)
p.paragraph-text.text-w-bold= item.title
.checkbox-wrapper
width: 76px
height: 40px
background: green
border-radius: 3em
padding: .3em
position: relative
transition: .25s linear all
transition-duration: 0.1s
.checkbox-wrapper
input(type="checkbox" id="checkbox")/
.btn-callback
display: flex
justify-content: center
width: 14em
max-width: 14em
text-decoration: none
border-radius: 100px
border: none
background: $btn-primary-bg
color: #fff