Traverse – very useful npm package

NPM has a lot, a lot of useful packages… and a lot of useless packages of course. Sometimes we can find something very nice. Last time I must modified nested object in JavaScript. I can write my own function to do this, use recursion for example, but I simply… didn’t have enough time to do this. I must find solution quickly, good solution. I and found – it’s traverse package. Yes, its name is very meaningful.

Continue reading “Traverse – very useful npm package”

Arrow functions in JavaScript

One of very, very nice ES6 capabilities are arrow functions. Using them, we can creae shorter, cleaner code, and also avoid important issues with this keyword – I wrote about this keyword in one of some ealier posts. This time I would like to write few sentences about arrow functions. If you do not know them yet, you should get to know them as soon as possible.

Continue reading “Arrow functions in JavaScript”

Dump and restore all MySQL databases with users

Last time I must reinstall my MacOS and configure all my development environment again. It wasn’t a big issues except MySQL database and users, becase there are a lot of databases, each with different credentials. I had to move all the data, because test app needs it. The question was: how can I dump not only databases using mysqldump, but also all users and all privileges? Fortunately, solution is very simple and mysqldump allows us to get all in only one command, so there is quick tip to dump all data:

mysqldump -uroot -p --flush-privileges --routines --all-databases > backup.sql

And then we can restore whole data on new server using standard mysql command:

mysql -uroot -p < backup.sql

Logitech M590 review – good mouse for office usage

Last autumn I must change my computer mouse – old was broken, slow and often recognize one click as twice. Looking for new mice was very difficult, because I have very precise requirements. My computer mouse should be created for office work, should be wireless, should have good battery life and also comfortable. I checked market and there were only few possible options. One of them was Logitech Anywhere MX 2, but I decided to use other Logitech product – M590. Why? Please check this quick review after more than half a year.

Continue reading “Logitech M590 review – good mouse for office usage”