What is recursion and when is it useful?

Recursion is the repeated application of a process. In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base condition. The base condition breaks out of the recursion loop because otherwise the function would call itself indefinitely. Continue reading What is recursion and when is it useful?

How to re-sync the MySQL DB if Master and Slave (replication) ?

This is the full step-by-step procedure to resync a master-slave replication from scratch: At the master: And copy the values of the result of the last command somewhere. Without closing the connection to the client (because it would release the read lock) Continue reading How to re-sync the MySQL DB if Master and Slave (replication) ?

MacOS – Manage FileVault from command line

FileVault is a built in application on your Mac that allows you to fully encrypt your hard disk. To check the status of file vault within Terminal type the following: fdesetup status To enable FileVault type the following: * Terminal Continue reading MacOS – Manage FileVault from command line

Linux – Import Multiple .sql dump files into mysql database

If you have a directory with a bunch of .sql files that mysql dumps of each database on my server. e.g. database1-2011-01-15.sql database2-2011-01-15.sql … To import all to the db we can: What others are reading:How to re-sync the MySQL Continue reading Linux – Import Multiple .sql dump files into mysql database