Skip to content

Instantly share code, notes, and snippets.

View Olegas's full-sized avatar

Oleg Elifantiev Olegas

  • Russia, Yaroslavl
View GitHub Profile
@Olegas
Olegas / Description.md
Last active August 29, 2015 14:22
Race condition in cluster RR scheduling
@Olegas
Olegas / amd.js
Created July 9, 2015 10:42 — forked from ipoddubny/amd.js
define(['cjs'], function (cjs) {
console.log('amd module loaded');
console.log('cjs exported:', cjs);
return 'AMD';
});
@Olegas
Olegas / readme.md
Last active October 15, 2018 19:54
  1. Спецификация requestAnimationFrame: http://www.w3.org/TR/animation-timing/
  2. Справочник свойств, приводящих к reflow/restyle/repaint: http://csstriggers.com
  3. Ян Бородецкий, Оптимизация рендеринга веб-страницы: https://www.youtube.com/watch?v=-uMZDzIhcHQ
  4. Avoid Large, Complex Layouts and Layout Thrashing https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts
@Olegas
Olegas / actions.js
Last active September 29, 2015 20:03
A story about pet store or Yet another stupid redux application
import decreaseFoodAction from 'FoodStoreActions';
import validationErrorAction from 'ValidationErrors';
function feedAnimalAction(animalName, amount) {
var animal = getAnimalByName(animalName);
// no write access here
var foodStore = State.get('store');
var preferredFood = Animal.getRequiredFoodType(animal);
if (Animal.isHungry(animal)) {
if (Store.hasSufficientFood(foodStore, preferredFood, amount)) {
@Olegas
Olegas / additional-links.md
Last active April 9, 2017 10:33
Additional links for "Redux for state management" talk
@Olegas
Olegas / files.js
Last active July 4, 2017 12:17 — forked from kvasdopil/files.js
const files = [/* file names here */];
const limit = 100;
async function main() {
var runningWorkers = 0;
function continuationHandler() {
runningWorkers--;
loadWorkers();
}
@Olegas
Olegas / deploy.sh
Last active December 1, 2020 21:14
Machine deployment
#!/bin/bash
# TODO Add GruvBox
# TODO Add oh-my-git
mkdir -p ~/work/no_backup
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
brew install python
brew install postgres
@Olegas
Olegas / Day17.js
Last active December 17, 2018 15:22
var input=`x=547, y=508..535
x=514, y=169..178
x=367, y=152..154
x=545, y=1483..1485
y=618, x=494..497
y=657, x=497..500
y=747, x=544..570
x=512, y=197..205
x=400, y=209..229
x=427, y=26..37
@Olegas
Olegas / questions-to-styled-components.md
Last active April 15, 2019 13:26
Вопросы к styled components

Вопросы к styled-components

Что с подсветкой синтаксиса?

Есть плагин styled-components для WebStorm, с ним работает подскветка и подсказки

Что с SSR? Он есть, но прилетает ли страница сразу со стилями или они попадают в DOM после оживления?