Skip to content

Instantly share code, notes, and snippets.

View webistomin's full-sized avatar
💙
Wondering why my code works.

Alexey Istomin webistomin

💙
Wondering why my code works.
View GitHub Profile
@apieceofbart
apieceofbart / test.js
Created February 21, 2018 13:15
mock lodash debounce in jest
// somewhere on top
import _ from 'lodash';
jest.unmock('lodash');
// then
_.debounce = jest.fn((fn) => fn);
@edtoken
edtoken / Javascript-Russian-Knowledge-NOTE.md
Last active September 5, 2024 20:22
Javascript Russian Knowledge NOTE

OUTDATED

This this super outdated, see v2 here

Posts

https://egghead.io/
https://github.com/trekhleb/javascript-algorithms
https://habr.com/post/359192/ алгоритмы на js все
https://www.youtube.com/watch?v=j4_9BZezSUA event loop
https://fseby.wordpress.com/2016/02/25/практическая-вводная-в-монады-в-javascript/
https://habrahabr.ru/company/mailru/blog/327522/   (Функциональное программирование в JavaScript с практическими примерами)

@LeCoupa
LeCoupa / vue_js_cheatsheet.js
Last active October 23, 2023 10:38
Vue js Cheatsheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* GLOBAL CONFIG
* Vue.config is an object containing Vue’s global configurations.
* You can modify its properties listed below before bootstrapping your application.
* https://vuejs.org/v2/api/#Global-Config
* ******************************************************************************************* */
// Configure whether to allow vue-devtools inspection
Vue.config.devtools = true
@bob-lee
bob-lee / polyfill-ie11-nodelist-foreach.js
Created November 24, 2017 18:41
Polyfill for IE11 missing NodeList.forEach
if ('NodeList' in window && !NodeList.prototype.forEach) {
console.info('polyfill for IE11');
NodeList.prototype.forEach = function (callback, thisArg) {
thisArg = thisArg || window;
for (var i = 0; i < this.length; i++) {
callback.call(thisArg, this[i], i, this);
}
};
}
@ianmcnally
ianmcnally / grid-auto-placement-polyfill.js
Last active February 24, 2019 11:21
Grid auto placement polyfill
import { columns, display, gridSpans, margin } from './css-modules-styles'
const COLUMNS = 12
const toArray = arrayLike => Array.prototype.slice.call(arrayLike)
const placeItemsOnGrid = grid => {
const withGutters = grid.classList.contains(columns.withGutters)
let currentColumnSpansInRow = 0
let currentRow = 1
@kerryboyko
kerryboyko / README.md
Last active April 26, 2023 16:08
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active May 8, 2025 01:33
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@fomvasss
fomvasss / Проектирование Rest API.txt
Last active August 7, 2024 12:31
Проектирование API.txt
Аббревиатура REST расшифровывается как representational state transfer — «передача состояния представления» или, лучше сказать, представление данных в удобном для клиента формате. Термин “REST” был введен Роем Филдингом в 2000 г. Основная идея REST в том, что каждое обращение к сервису переводит клиентское приложение в новое состояние. По сути, REST — не протокол и не стандарт, а подход, архитектурный стиль проектирования API.
Любой ресурс имеет ID, по которому можно получить данные.
Сервер не хранит состояние — это значит, сервер не отделяет один вызов от другого, не сохраняет все сессии в памяти.
Методы POST и PUT должны возвращать обратно объект, который они изменили или создали, — это позволит сократить время обращения к сервису вдвое.
Возвращайте соответствующие http коды статуса в каждом ответе. Успешные ответы должны содержать следующие коды:
200 — для GET запроса и для синхронных DETELE и PATCH
201 — для синхронного POST запроса
202 — для асинхронных POST, DELETE и PATCH запросов
@iamakulov
iamakulov / passive-true-analysis.md
Last active March 3, 2022 23:27
Analysis of passive: true

Analysis of passive: true

In 2017, Chrome, Firefox and Safari added support for passive event listeners. They help to make scrolling work smoother and are enabled by passing {passive: true} into addEventListener().

The explainer mentions that passive: true works for wheel and touch events. I practically analyzed when passive: true actually helps:

Event Works better with passive: true Is passive by default
wheel¹ Yes (Chrome), No (Firefox) No (Chrome), No (Firefox)
touchstart Yes (Chrome), ?² (Firefox) Yes (Chrome), ?² (Firefox)
@akella
akella / setup.md
Last active February 21, 2023 22:59
Мой сетап

То что я использую в работе и стримах

Софт для разработки