MDL 2018 – Fantastic gravel, terrible weather

I started beginning of September in Lubin, on this year’s edition of Marathon Around the Lubin (in Polish: Maraton Dookoła Lubina, MDL). Some competitors (runners) started day before – they must run 100 kilometers… I started on Saturday morning with few friends – they decided to ride 75 kilometers distanse, I again ride 110 km. Everyone could choose distance and also choose path during day: we only must visit some checkpoints and get some stamps on received maps. 

As year before, it was again very nice time and great riding. A lot of gravel – on forest, on paths, sometimes on sands, and with some tarmac kilometers. Everything was great except weather. Forecasts said: it will be sunny… or it will be rainy day. It was pretty nice in the morning, but after few hours… heavy rain and we all completed race completely soaked. But it still was great. And gravel bike was also great again :) 

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