Author Archives: bullgare

Kubectl helpful commands

k8s cheatsheet. Get all pods by label

Exec into the pod

Port forwarding

Getting logs

Get replica limits from configs:

Remove pod from load balancing to debug startup errors:

Scale (up/down) pods:

More commands here: https://kubernetes.io/docs/reference/kubectl/overview/ https://kubernetes.io/docs/reference/kubectl/cheatsheet/

Using npm registry from corporate network

In a company we have some kind of proxy that does not allow to install npm packages via npm or yarn. You can get rid of this problem using this addition to yarn add:

Or you can also replace global property with

https://stackoverflow.com/a/22390936/801426

Performance comparison table for javascript frameworks

http://www.stefankrause.net/js-frameworks-benchmark7/table.html Example results are as follows:

Execution context and activation object in details

There are many interesting articles both in Russian and English. You can start with this one — http://dmitrysoshnikov.com/ecmascript/javascript-the-core/#execution-context-stack. In Russian — http://dmitrysoshnikov.com/ecmascript/ru-javascript-the-core/#stek-kontekstov-ispolneniya The short summary Javascript runtime is synchronous and processes Execution Context Stack. It’s bottom Execution Context is global object as everything starts with this. When some function or eval is being called, runtime …

Read more

Multiple react applications on one page. Theory

Yes, it can be done. That’s how you render several react apps on one page:

Implementations of sort algorithms in javascript

Implementations of bubble, selection, merge, and quick sorts. https://gist.github.com/bullgare/0da3207aa55a200ce36837ff904962a2

Cool talk on js event loop and call stack

It’s junior-middle level, but animations are great. https://youtu.be/8aGhZQkoFbQ Here’s an article about almost the same but in more details about difference between tasks’ queue (timeouts) and microtasks’ queue (promises and DOM modifications). The main idea is that there are several queues that have different priorities. And microtasks are more important than tasks. https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/

Front-end interview questions with answers

Yeap, yet another one. https://github.com/yangshun/front-end-interview-handbook That’s what it has now: Table of Contents

React. Benchmarking and optimizing performance

There is a tool called react-addons-perf that should be imported into your project.

After that you can use Perf object in your console. It can tell you about your react performance issues, not including redux. For instance, you can check unnecessary renders or unnecessary change calculations:

Here’s more on that — https://reactjs.org/docs/perf.html. And …

Read more

MVC vs Flux

They are all architecture patterns. M is for model. It stores generic logic for the model like fields and calculations based on the fields like validation and stuff. V is for view. It just renders stuff and passes user interactions (events) to its controller via the controller’s API. C is for controller that ties models …

Read more