The url has changed: https://odan.github.io/2017/01/07/basic-crud-operations-with-pdo.html
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
| import os | |
| import random | |
| class SecureDelete: | |
| BLOCK_SIZE = 16 << 12 | |
| def secure_delete(self, base_path): | |
| if os.path.isdir(base_path): | |
| file_list = self._enum_paths(base_path) |
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
| try { | |
| assert(Life.isReal); | |
| assert(Life.isFantasy); | |
| } catch (LandSlideException ex) { | |
| while(!Reality.isEscapable) { | |
| self.eyes.forEach(function(eye) { | |
| eye | |
| .open() | |
| .lookTo(Sky) | |
| .see(); |
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
| #!/bin/bash -e | |
| # IMPORTANT. My phpstom installation exists on /opt/phpstorm. | |
| # Early Access program: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program | |
| # For stable releases try: https://data.services.jetbrains.com/products/download?code=PS&platform=linux | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root." | |
| exit 1 | |
| fi |
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
| -- Add these to speed up OpenCart | |
| ALTER TABLE `oc_product` ADD INDEX(`date_available`, `status`); | |
| ALTER TABLE `oc_product` ADD INDEX(`status`); | |
| ALTER TABLE `oc_url_alias` ADD UNIQUE(`query`); | |
| ALTER TABLE `oc_product_to_store` ADD INDEX(`store_id`); | |
| ALTER TABLE `oc_category_path` ADD INDEX(`path_id`, `category_id`); | |
| ALTER TABLE `oc_category_path` ADD INDEX(`category_id`, `path_id`); | |
| ALTER TABLE `oc_product_description` ADD INDEX(`language_id`); | |
| ALTER TABLE `oc_category` ADD INDEX (`parent_id`, `status`, `sort_order`); | |
| ALTER TABLE `oc_category` ADD INDEX(`sort_order`); |