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
# File: vendor/magento/framework/App/State.php | |
public function emulateAreaCode($areaCode, $callback, $params = []) | |
{ | |
$currentArea = $this->_areaCode; | |
$this->_areaCode = $areaCode; | |
$this->_isAreaCodeEmulated = true; | |
try { | |
$result = call_user_func_array($callback, $params); | |
} catch (Exception $e) { | |
$this->_areaCode = $currentArea; |
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
SELECT | |
col, | |
COUNT(col) | |
FROM | |
table_name | |
GROUP BY col | |
HAVING COUNT(col) > 1; | |
--- |
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
-- Category: | |
SET @entity_id = 1; | |
(SELECT e.attribute_code, 'varchar' AS type, v.store_id, v.value FROM catalog_category_entity_varchar v | |
JOIN eav_attribute e ON e.attribute_id = v.attribute_id WHERE v.entity_id = @entity_id) | |
UNION | |
(SELECT e.attribute_code, 'datetime' AS type, v.store_id, v.value FROM catalog_category_entity_datetime v | |
JOIN eav_attribute e ON e.attribute_id = v.attribute_id WHERE v.entity_id = @entity_id) | |
UNION | |
(SELECT e.attribute_code, 'decimal' AS type, v.store_id, v.value FROM catalog_category_entity_decimal v |
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
SET [GLOBAL|SESSION] sql_mode='NO_AUTO_VALUE_ON_ZERO' |
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
/* | |
By Ryan Mulligan | |
Source: https://css-tricks.com/bold-on-hover-without-the-layout-shift/ | |
*/ | |
.menu-link { | |
display: inline-flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: space-between; | |
padding: 1rem 1.5rem; |
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
# Enter varnish admin | |
varnishadm | |
# clear cache for index home page only | |
ban req.http.host ~ windparadise.com && req.url ~ "^/$" | |
# clear cache for specific page |
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
/* smartphones, touchscreens */ | |
@media (hover: none) and (pointer: coarse) { | |
/* ... */ | |
} | |
/* stylus-based screens */ | |
@media (hover: none) and (pointer: fine) { | |
/* ... */ | |
} | |
/* Nintendo Wii controller, Microsoft Kinect */ | |
@media (hover: hover) and (pointer: coarse) { |
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
# run composer to avoid memory limit error | |
php -d memory_limit=-1 /usr/local/bin/composer … | |
# ignore requirements | |
composer ... --ignore-platform-reqs |
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
# List all containers | |
$ docker ps -a | |
# List started containers | |
$ docker ps | |
# List stopped containers | |
docker ps --filter "status=exited" | |
# Stop container |
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
git init | |
git add . | |
git commit -m "initial commit of full repository" | |
git remote add origin <bitbucket_URL> | |
git push -u origin --all | |