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
#!/bin/bash | |
DOMAIN=example.com | |
wget -w 2 -r --spider --delete-after -nd -nc --domains=$DOMAIN $DOMAIN > /dev/null 2>&1 & |
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
-- Make sure to uncomment one of the where conditions below or your query will take forever | |
select | |
lu.visit_time, | |
inet_ntoa(lvi.server_addr) server_addr, | |
inet_ntoa(lvi.remote_addr) remote_addr, | |
lui.url, | |
lc.customer_id, | |
ce.email, | |
cs.name store, | |
lvi.http_user_agent, |
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
<script> | |
var settings = { | |
exclude: ["US"], | |
regionselector: "example.com/regionselector", | |
homepages: { | |
"US": "example.com", | |
"DE": "example.com/de", | |
"FR": "example.com/fr", | |
"EU": "example.com/eu" | |
} |
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
-- This takes about 30 seconds, but will make the next query a billion times faster | |
alter table sales_flat_order_item add index (product_id); | |
-- This takes about 5 seconds with the index added | |
select | |
cpe.entity_id product_id, | |
cpe.sku, | |
at_style_number.value style_number, | |
cpe.created_at product_created_date, | |
sum(sfoi.qty_ordered) total_ordered, |
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
set @datetime = '2015-03-25 10:30:00'; | |
set @threshold = 15; | |
select | |
job_code, | |
status, | |
messages, | |
executed_at, | |
finished_at, | |
timediff(finished_at, executed_at) run_time |
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 | |
sfo.entity_id, | |
sfo.increment_id, | |
sfo.created_at, | |
sfo.status, | |
sfo.state, | |
sfo.customer_id, | |
sfo.ap21_order_id, | |
sfo.ap21_person_id, | |
ce.email, |
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
jQuery('.nestedlisting .give-gold').each(function (i, that) { | |
setTimeout(function() { | |
jQuery(that).click(); | |
}, i * 1000); | |
}); | |
jQuery('button.btn.gold-button[type=button]:visible').each(function (i, that) { | |
setTimeout(function() { | |
jQuery(that).click(); | |
}, i * 1000); | |
}); |
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
#!/bin/bash | |
if [[ -e ../../app/etc/local.xml ]] | |
then | |
if [[ ! -d ../../var/support ]] | |
then | |
mkdir ../../var/support || | |
if [[ $? != 0 ]] | |
then |
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
set @lifecycle_attr_id = 144; | |
set @isorderable_attr_id = 151; | |
set @ispreorderable_attr_id = 186; | |
set @lifecycle_attr_value_active = 23; | |
set @lifecycle_attr_value_prerelease = 155; | |
select | |
cpe.entity_id product_id, | |
cpe.sku |
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 ini_set('display_errors', 1) ?> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/styles/default.min.css"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.5/highlight.min.js"></script> | |
<script>hljs.initHighlightingOnLoad();</script> | |
<?php | |
// we need the autoloader | |
include 'app/Mage.php'; | |
$classes = array( |