Skip to content

Instantly share code, notes, and snippets.

View OlegLustenko's full-sized avatar

Oleg Lustenko OlegLustenko

View GitHub Profile
@OlegLustenko
OlegLustenko / FlowReactTutorial.js
Created November 27, 2017 11:46 — forked from busypeoples/FlowReactTutorial.js
Flow Fundamentals For ReactJS Developers
// @flow
// Flow Fundamentals For ReactJS Developers
/*
Tutorial for ReactJS Developers wanting to get started with FlowType.
We will go through the basic Flow features to gain a better understanding of how to use FlowType with React.
You can uncomment the features one by one and work through this tutorial.
If you want to learn the very FlowType basics, refer to "Flow Fundamentals for JavaScript Developers" (https://gist.github.com/busypeoples/61e83a1becc9ee9d498e0db324fc641b) first.

I was reviewing some notes from 1-1 meetings that me and my manager Dave used to have, and I thought I'd summarize a bunch of the repeated talking points we've had over the years. Here's some of what I've learned about being a competent professional. Identify and focus on your top priorities – because if you don't, wtf are you doing?

Is the top priority the top priority? What's the single most important thing you need to be doing? If you don't have an answer to this, you should drop everything and figure out what the answer is. Having an answer here forces clarity and focus. Not having an answer is dangerous – it guarantees that you'll be working on unimportant things and wasting your precious time. There will always be an endless stream of things to do. It'll be tempting to do whatever is easiest, or most fun, or most familiar. But this is a trap that will screw you over in the long run. It's better to make 5-10% progress on the most important thing than to finish lots of tasks that don't actually move the

@OlegLustenko
OlegLustenko / 1.js
Created October 2, 2017 07:30 — forked from kana-sama/1.js
class Nil {}
class Cons { constructor( head, tail) { Object.assign(this, { head, tail }); } };
class Pair { constructor(first, second) { Object.assign(this, { first, second }); } };
const _1 = () => 1;
const _2 = () => 2;
const _3 = () => 3;
const nil = () => new Nil();
const cons = (head, tail) => () => new Cons(head, tail);
@OlegLustenko
OlegLustenko / UIStates.re
Created August 18, 2017 19:33 — forked from busypeoples/UIStates.re
Displaying different UI States nicely in Reason
/* Slaying a UI Anti Pattern in Reason */
type remoteData 'e 'a =
| Nothing
| Loading
| Failure 'e
| Success 'a;
type item = {
userId: int,
@OlegLustenko
OlegLustenko / cloudSettings
Last active December 9, 2017 08:29
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-12-09T08:29:33.415Z","extensionVersion":"v2.8.6"}
@OlegLustenko
OlegLustenko / .hyper.js
Created July 22, 2017 15:54 — forked from fredericmarx/.hyper.js
Configuration file for Hyper https://hyper.is/
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
fontFamily: '"Input Mono", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@OlegLustenko
OlegLustenko / prefetch.js
Created July 21, 2017 07:20 — forked from acdlite/prefetch.js
Prefetching in React
function prefetch(getKey, getValue, getInitialValue, propName) {
const inFlight = new Set();
const cache = new Map();
return ChildComponent => {
return class extends React.Component {
state = {value: getInitialValue(this.props)};
componentWillReceiveProps(nextProps) {
const key = getKey(nextProps);
if (cache.has(key)) {
// Use cached value
@OlegLustenko
OlegLustenko / axios-instance-config.js
Created July 7, 2017 10:44 — forked from ccnokes/axios-instance-config.js
Good default configuration for axios in node.js
const axios = require('axios');
const http = require('http');
const https = require('https');
module.exports = axios.create({
//60 sec timeout
timeout: 60000,
//keepAlive pools and reuses TCP connections, so it's faster
httpAgent: new http.Agent({ keepAlive: true }),
@OlegLustenko
OlegLustenko / readme.md
Last active July 4, 2017 12:58
Why Flow instead TypeScript
@OlegLustenko
OlegLustenko / github - basic.md
Last active May 15, 2017 15:04
github instruction

Базовая инструкция github

  1. Качаете нужную для вас версию гитхаба отсюда: https://git-scm.com/download/win

  2. Устанавливаете

  3. Вам необходима только установка GIT отсюда -> https://habrahabr.ru/sandbox/37865/

  4. Далее идете в своего пользователя на github и проделываете эти шаги попорядку: