CHEAT SHEET

GIT bash cheatsheet

Synchronizing Filezilla site config between all devices.

Two way communication between parent document and iFrame

Using mkcert to create locally-trusted development certificates.

mkcert git repo Creating certificate files Navigate to desired location where the certificate will be created (for example $ mkdir ...

Using JavaScript find to search array of object

var arr = [ {one: 1}, {one: 2} ] var result = arr.find( obj => obj.one > 1 ); console.log(result); ...

Simple use of Java Script spread operator

Converting array into object // The array var numbers = [1,2,3]; var obj = {...numbers } console.log(obj) // result: {0:1, ...

regular JavaScript functions vs array functions

Does not have its own bindings to this or super, and should not be used as methods. var obj1 = { a: 123, b: ...

JavaScript call, bind and apply simple

According MDN all three methods are very similar, and at the end they produce very similar result. they all accept ...

How to solve “Can’t perform a React state update on an unmounted component”

The scenario - Let's imagine that you have a card component that you could show and hide with a button ...

Using Nginx as a reverse proxy and add source code replacement

Task: I have web app (in my case Node app running on port 3000) I would add Nginx in front ...

Simple caching using browser’s service workers.

A service worker API is relatively new technology, allowing for running a special type of web worker (a JavaScript), that ...

Simple use of Promises in JavaScript

Here is a simple and a bit silly example of using promises. In real life we could just move the ...

Listen for DOM changes using Mutation Observer

If we ever needed to listen for DOM events, one of the first options that comes to our mind might ...

Passwordless SSH log in for MAC OS X

On the machine from you want to ssh to ypur dream server: Create id_rsa key. when prompted use the suggested ...

Debugging SSH issues on OS X

Most common problems could be: Directory permissions directory permission permission code /Users/[usename] 755 rwxr-xr-x /Users/[usename]/.ssh 700 rwx------ /Users/[usename]/.ssh/id_rsa 600 rw------- ...

Understanding Java Script Map, Filter and Reduce

The array // The array var people = [ { name: 'john', age: 24, weight: 84 }, { name: 'tim', ...

Multiple asynchronous http calls using curl

If you ever needed to fetch data from multiple sources on the backend, probably you already explored the benefits of ...