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
# filter by request host header | |
varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
# filter by request url | |
varnishlog -q 'ReqURL ~ "^/some/path/"' | |
# filter by client ip (behind reverse proxy) | |
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
# filter by request host header and show request url and referrer header |
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
/* | |
* IMPORTANT: The queries below are written for Magento Community. If you're going to run them on Magento Enterprise (Adobe Commerce), you need | |
* to replace all instances of ".entity_id" with ".row_id". See this for context: http://magento.stackexchange.com/questions/139740/magento-2-schema-changes-for-ee-catalog-staging | |
* | |
* When importing products in Magento 2, if you specify store view codes in the store_view_code column, product data will be set at | |
* both the global scope as well as the specific store view scope. This is not ideal because now you have duplicate | |
* data at two different scopes that shouldn't actually be duplicated. The scripts below clean up this data by finding | |
* data set at specific store view scopes and if it's an exact match to the data set at the global store view, then it | |
* deletes the data set at the specific store view scope. | |
* |
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
<?php | |
// Base-name | |
$name = 'foobar'; | |
// Init Magento | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
// Create the root catalog |
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
<!-- Add to the package layout (via local.xml or however you prefer) --> | |
<!-- Also, best to remove before deployment, as some users report --> | |
<!-- it makes IE 7 crash --> | |
<default> | |
<reference name="content"> | |
<block type="core/text" name="fix.console" as="fix.console"> | |
<action method="setText"> | |
<text><![CDATA[<script type="text/javascript"> | |
iframe = document.createElement('iframe'); | |
iframe.style.display = 'none'; |