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

Okraj Pass – mountains teach humility

The plan was: go to Karpacz and Kowary by car, and then start riding on bicycle and attack Okraj Pass. But I changed this plan and decided to… ride to Kowary from home, then attack Okraj and just go back. This trip was long and difficult. Distance was shorter than on 305 km trip, but mountains… they teach humility, because it’s a completely different ride. I started ride real uphill after 122 kilometers… And totally damaged my previous results! It was fantastic, also downhill was very exciting and faaaaast. But after that I decided to attack another mountain: short, because only about 3,5 kilometers, but with 10-15% elevation. It was horrible and destroyed me mentally and physically: 34T on front 28T on back was not enough. Returning home was difficult, about 90-100 km to the wind. But… it was worth it!

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”