Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Kleshnin ivan-kleshnin

View GitHub Profile
View telegram-post-antshater.md

paqmind

ФУЛЛСТЕК РАЗРАБОТКА для продвинутых

Утомили пересказы документации и Hello-World туториалы?

На Paqmind регулярно публикуем уникальный авторский контент по
веб-разработке и программированию для уровней Junior+, Middle и выше.

  • современные технологии и тренды
View .eslintrc.json
{
// An .eslintrc starter file with all rules (set to 0) and envs (set to false) listed.
// Other options (although by no means comprehensive) are either set to false or else commented out.
//
// ESLint docs -- Configuring ESLint: https://eslint.org/docs/user-guide/configuring
// ESLint docs -- List of available rules: https://eslint.org/docs/rules/
"parserOptions": {
// "ecmaVersion": 5, // set to 3, 5 (default), 6, 7, or 8 to specify the version of ECMAScript syntax you want to use.
// // You can also set to 2015 (same as 6), 2016 (same as 7), or 2017 (same as 8) to use the year-based naming.
@ivan-kleshnin
ivan-kleshnin / promise.js
Created Jun 19, 2019 — forked from vkarpov15/promise.js
Simple Promises/A+ Compliant Promise
View promise.js
const assert = (v, err) => {
if (!v) {
throw err;
}
};
let counter = 0;
class Promise {
constructor(executor) {
@ivan-kleshnin
ivan-kleshnin / design-for-non-designers.md
Last active May 20, 2019
Design resources for non-designers
View design-for-non-designers.md
View swap.js
function swap(i1, i2, xs) {
if (i1 == i2) return xs
return xs.reduce((z, x, i) => {
return i == i1 ? z :
i == i2 ? (i1 > i2 ? [...z, xs[i1], x] : [...z, x, xs[i1]]) :
[...z, x]
}, [])
}
// Например, переставить 'B' с i1 = 1 на i2 = 4
View SSR.md

A tale of SSR

Attempts to recover our SSR functionality.

  1. After.js [-]
  • Semi-dead project. Suggest to switch to Razzle (its core)
  1. Razzle [-]
View preparation.checklist.md
View performance.checklist.md

1. HTTP Performance

1.1 Reduce number of HTTP Requests

  • Use HTTP/2
  • GraphQL
  • CSS sprites
  • Bundling
  • Browser Caching
  • Cache Busting
View oop.txt
Object Oriented Programming
I Objects / Classes are main units of design
II Objects are namespaces (expression problem, duality with Functional Programming)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
III Delegation / Inheritance (type dependency)
IV Constructors (vs data constructors)
V Mutability (shared state)
VI Fluent API (http://paqmind.com/blog/fluent-api-debunked/)
VII Instance
@ivan-kleshnin
ivan-kleshnin / reactive-middleware-stack-proto.js
Last active Oct 26, 2017
Reactive middleware stack prototype
View reactive-middleware-stack-proto.js
import * as R from "ramda"
let Atom = R.curry((options, actions) => {
console.log(`@ Atom "${options.name || ""}" is called`)
return {$: "$"}
})
let withLog = R.curry((options, Atom) => {
return (actions) => {
console.log(`@ Shell "withLog" is called`)