Wednesday, March 29, 2017

Permission denied issue on yarn global package

Unlike npm, location of global package on yarn is "/usr/bin" as default.
Therefore running yarn command without sudo occur to deny permission.
Avoid this situation, follow next instruction.

Check your default bin location of yarn.
yarn global bin
Create new directory in your favorite location.
mkdir ~/.yarn/global
Change default bin location of yarn.
yarn config set prefix ~/.yarn/global
And add path as environment variable in "~/.bashrc".
export PATH=${PATH}:`yarn global bin`

Saturday, March 25, 2017

Ubuntu | "/sbin/ldconfig.real: /usr/lib/nvidia-375/libEGL.so.1 is not a symbolic link"

Run next commands.
sudo mv /usr/lib/nvidia-375/libEGL.so.1 /usr/lib/nvidia-375/libEGL.so.1.org
sudo mv /usr/lib32/nvidia-375/libEGL.so.1 /usr/lib32/nvidia-375/libEGL.so.1.org
sudo ln -s /usr/lib/nvidia-375/libEGL.so.375.39 /usr/lib/nvidia-375/libEGL.so.1
sudo ln -s /usr/lib32/nvidia-375/libEGL.so.375.39 /usr/lib32/nvidia-375/libEGL.so.1

Sunday, March 5, 2017

"The user limit on the total number of inotify watches was reached"

This error reach a system limit on the number of files you can monitor.
See your current system limit.
cat /proc/sys/fs/inotify/max_user_watches
You can temporarily change limit with next command.
sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl -p
Also you can permanently change limit with next command.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Create shortcut for running specific android virtual device.

Saturday, March 4, 2017

copy and paste to other file in neovim

Open source file and press A key for select range.
Then press "+yy.
Open destination file and press "+p at your favorite location.

How to add shortcut in launcher on Ubuntu 16.04 LTS

Shortcut files of launcher are placed in ~/.local/share/applications.
Create .desktop file to reference next code.