Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
| <?php | |
| namespace Sugarcrm\Sugarcrm\custom\Console\Command;; | |
| use Sugarcrm\Sugarcrm\Console\CommandRegistry\Mode\InstanceModeInterface; | |
| use Symfony\Component\Console\Command\Command; | |
| use Symfony\Component\Console\Input\InputInterface; | |
| use Symfony\Component\Console\Output\OutputInterface; | |
| use Symfony\Component\Console\Helper\Table; | |
| //Create the file in custom/src/Console/Command/CaseStatusCommand.php |
| <?php | |
| //define in custom/Extension/application/Ext/Console/RegisterCaseStatusCommand.php | |
| Sugarcrm\Sugarcrm\Console\CommandRegistry\CommandRegistry::getInstance() | |
| ->addCommand(new Sugarcrm\Sugarcrm\custom\Console\Command\CaseStatusCommand()) | |
| ; |
| <?php | |
| if (!defined('sugarEntry')) { | |
| define('sugarEntry', true); | |
| } | |
| require_once('include/entryPoint.php'); | |
| function getPDOConnection() | |
| { | |
| global $sugar_config; |
| DROP FUNCTION IF EXISTS getAge; | |
| CREATE FUNCTION getAge(date_of_birth DATE) RETURNS INT | |
| BEGIN | |
| DECLARE age INT DEFAULT 0; | |
| SELECT TIMESTAMPDIFF(YEAR,date_of_birth,CURDATE()) INTO age; | |
| RETURN age; | |
| END; |
| <?php | |
| if (!defined('sugarEntry')) { | |
| define('sugarEntry', true); | |
| } | |
| require_once('include/entryPoint.php'); | |
| function getPDOConnection() | |
| { | |
| global $sugar_config, $db; |
I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.
So below I made a list of leetcode problems that are as close to grokking problems as possible.