Today very short, but I think helpful post about null coalescing operator. As I guess, you use a lot of if/else expressions in code. Sometimes we must check simple condition to set variable. There are two standard approaches. First, using if/else:Continue reading “PHP – Null Coalescing Operator”
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 :)
And one again on Okraj Pass. But this time, it was a sports competition – uphill in the fastest way. I improved my personal records on all segments so… it was very, very good ride!
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