This file contains 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
SELECT | |
cce.entity_id AS category_id, | |
GROUP_CONCAT(eav.value ORDER BY parent.path ASC SEPARATOR '/') AS category_path | |
FROM | |
catalog_category_entity AS cce | |
JOIN | |
catalog_category_entity AS parent ON cce.path LIKE CONCAT(parent.path, '%') | |
JOIN | |
catalog_category_entity_varchar AS eav ON parent.row_id = eav.row_id | |
WHERE |
This file contains 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
SELECT | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
WHERE table_schema = "<db_name>" | |
AND table_name = "<table_name>"; |
This file contains 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
## Use the latest PHP_Codesniffer version | |
composer require squizlabs/php_codesniffer:^3.5 --dev | |
## Use the latest versino of Magento Coding Standard | |
composer require magento/magento-coding-standard:^28 --dev -W | |
## Make sure phpcs works | |
vendor/bin/phpcs -i | |
## Add Magento 2 Coding Standard to PHP_Codesniffer |
This file contains 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
file_put_contents(BP.'/var/log/logfilename.log', "\nLog info: $variable\n", FILE_APPEND); |
This file contains 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
=IF(ISNUMBER(SEARCH("""",B2)), LEFT(B2,LEN(B2)-1), IF(ISNUMBER(SEARCH("mm", B2)),LEFT(B2, LEN(B2)-2) / 25.4,IF(ISNUMBER(SEARCH("M", B2)),LEFT(B2, LEN(B2)-1) * 39.37,IF(ISNUMBER(SEARCH("ft", B2)),LEFT(B2,LEN(B2)-2) * 12,B2)))) |
This file contains 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
$zip = new Zip(); | |
$zip->setArchive($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'media/ziptest.zip'); | |
$location = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'media/zip_test/'; | |
move_uploaded_file($_FILES['file0']['tmp_name'], $location . 'tmp_file0.pdf'); | |
move_uploaded_file($_FILES['file1']['tmp_name'], $location . 'tmp_file1.pdf'); | |
$fileArchive = $zip->compress($_FILES['file0']['tmp_name']); |
This file contains 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
find TargetDirectory/ -mindepth 2 -type f -exec mv -i '{}' TargetDirectory/ ';' |
This file contains 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
javascript:(function(){function checkFrames(w) {try {var inputs = w.document.getElementsByTagName('input');for (var i=0; i < inputs.length; i++) {if (inputs[i].type && inputs[i].type == 'checkbox'){inputs[i].checked = !inputs[i].checked;}}} catch (e){}if(w.frames && w.frames.length>0){for(var i=0;i<w .frames.length;i++){var fr=w.frames[i];checkFrames(fr);}}}checkFrames(window);})() |
This file contains 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
# Update "local_url" with the value of WARDEN_ENV_NAME | |
SET @localUrl = "{{local_url}}"; | |
SET @scope = 0; #update scope if needed for each website/store | |
UPDATE | |
core_config_data | |
SET | |
`value` = concat("https://app.", @localUrl, ".test/") | |
WHERE | |
path LIKE "web/%/base_url" |