This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Получаем хэш-код коммита, к которому хотим вернуться. | |
| 2. Заходим в папку репозитория и пишем в консоль: | |
| $ git reset --hard a3775a5485af0af20375cedf46112db5f813322a | |
| $ git push --force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - | |
| # OR | |
| # wget -qO- https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - | |
| deb https://deb.nodesource.com/node_8.x xenial main | |
| # deb-src https://deb.nodesource.com/node_8.x xenial main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| ini_set("max_execution_time", 0); | |
| ignore_user_abort(true); | |
| $current_prefix = $modx->config['table_prefix']; | |
| $new_prefix = 'My_Prefix234_'; | |
| $stmt = $modx->query("SHOW TABLES"); | |
| $tables = $stmt->fetchAll(PDO::FETCH_NUM); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $context = $modx->context->get('key'); | |
| if ($context == 'mgr' || empty($_POST['quick_order']) || empty($_POST['id']) || empty($_POST['customer'])) { | |
| return; | |
| } | |
| /** | |
| * @var miniShop2 $miniShop2 | |
| */ | |
| $miniShop2 = $modx->getService('minishop2'); | |
| $miniShop2->initialize($context, array( |