Skip to content

Instantly share code, notes, and snippets.

View steverobbins's full-sized avatar

Steve Robbins steverobbins

View GitHub Profile
#!/bin/bash
DOMAIN=example.com
wget -w 2 -r --spider --delete-after -nd -nc --domains=$DOMAIN $DOMAIN > /dev/null 2>&1 &
-- 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,
<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 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,
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
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,
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);
});
#!/bin/bash
if [[ -e ../../app/etc/local.xml ]]
then
if [[ ! -d ../../var/support ]]
then
mkdir ../../var/support ||
if [[ $? != 0 ]]
then
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
@steverobbins
steverobbins / magento-ioncube-module-info.php
Last active May 12, 2021 21:32
Display what information we can about Magento1 objects that are ioncubed (or any class really)
<?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(