Skip to content

Instantly share code, notes, and snippets.

View ArtemVeremienko's full-sized avatar
🤓
To understand recursion, you must first understand recursion

Artem Veremiienko ArtemVeremienko

🤓
To understand recursion, you must first understand recursion
View GitHub Profile
@ArtemVeremienko
ArtemVeremienko / tokens.md
Created October 8, 2023 18:05 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
import React from 'react';
import PropTypes from 'prop-types';
export default class extends React.Component {
static defaultProps = {
onChange: function (e) { },
nativeProps: {}
}
static propTypes = {
@ArtemVeremienko
ArtemVeremienko / intersection.js
Created September 29, 2020 19:53
Функция, которая создаёт массив из уникальных значений, которые есть в каждом из предоставленных массивов.
/**
* Описание задачи: Напишите функцию, которая создаст массив из уникальных значений, которые есть в каждом из предоставленных массивов.
* Ожидаемый результат: ([1, 2], [2, 3]) => [2]
* Сложность задачи: 4 of 5
* @param {?} arrays - Массив примитивных значений
* @returns {Array}
*/
const intersection = (...arrays) => {
let result = arrays[0].filter(el => arrays[1].includes(el))
if (arrays.length > 2) intersection(result, ...arrays.slice(2))
@ArtemVeremienko
ArtemVeremienko / .markdown
Created April 22, 2020 08:32
Модальное диалоговое окно с формой
@ArtemVeremienko
ArtemVeremienko / .markdown
Created April 21, 2020 09:55
Управляем клавиатурой
@ArtemVeremienko
ArtemVeremienko / .markdown
Created April 21, 2020 09:22
Редактируемая таблица
@ArtemVeremienko
ArtemVeremienko / index.html
Created April 20, 2020 10:22
Lazy load images (JS)
<p>Text and pictures are from https://wikipedia.org.</p>
<h3>All images with <code>data-src</code> load when become visible.</h3>
<h1>Solar system</h1>
<p>The Solar System is the gravitationally bound system comprising the Sun and the objects that
orbit it, either directly or indirectly. Of those objects that orbit the Sun directly,
the largest eight are the planets, with the remainder being significantly smaller objects,
such as dwarf planets and small Solar System bodies.
@ArtemVeremienko
ArtemVeremienko / drag-superheroes-around-the-field.markdown
Last active April 18, 2020 20:43
Drag superheroes around the field