Wednesday, December 20, 2017

Downgrade npm to v4 for developing React Native

Run next command.
npm install -g npm@4

Friday, December 15, 2017

Bluetooth keyboard shortcut on iOS 11

Spotlight search.
CMD + Space

Change keyboard language.
CTRL + Space

Go to home.
CMD + H

Volume up/down.
F12/F13

Mute Volume.
F11

Wednesday, December 13, 2017

Align center tab in Ant Design

Add next style option to the tab component.
tabBarStyle={{textAlign: 'center'}}

100% height in Ant Design

In ant design you want to 100% height of some component.
Add next style option.
style={{height:"100vh"}}

Thursday, December 7, 2017

Add permanently ssh key on macOS

Run next command.
ssh-add -K ~/.ssh/[YOUR_PRIVATE_KEY]

Add config file in "~/.ssh/" with next contents.
Host github.com
    HostName github.com
    User enzinier
    PreferredAuthentications publickey
    IdentityFile /Users/jason/.ssh/enzinier-GitHub
    AddKeysToAgent yes
    UseKeychain yes

Key option is AddKeysToAgent, UseKeychain.

Monday, September 18, 2017

Debugging react app with Jetbrain WebStorm

If you try debugging react app with JetBrains WebStorm, you nothing to do.
For debugging you must install JetBrains IDE Support chrome extension.
JetBrains IDE Support

Tuesday, April 4, 2017

Get parameter from url

function getUrlParameter(paramName) {
    var currentUrl = window.location.search.substring(1);
    var urlParams = currentUrl.split("&");
    for (var i = 0; i < urlParams.length; i++) {
        var paramNames = urlParams[i].split("=");
        if (paramNames[0] == paramName) {
            return paramNames[1];
        }
    }
}