Skip to content

Instantly share code, notes, and snippets.

View gamort's full-sized avatar

Gary Mort gamort

View GitHub Profile
@gamort
gamort / docker.hyperkit.throttle.sh
Created February 21, 2018 18:27
Throttle hyperkit
#!/usr/local/bin/bash
if [[ $EUID > 0 ]]; then
echo "Please run this script as root/sudo"
exit 1
fi
# Pass --kill as argument to kill all running cputhrottles
if [[ $1 = "--kill" ]]; then
echo "Looking for running cputhrottles..."
@gamort
gamort / resetindex.php
Created February 13, 2017 19:01
Forces Magento EE to reindex all products
<?php
require_once __DIR__ . "/../app/Mage.php";
Mage::app();
$tables = [
'catalog_category_product_cat',
'catalog_category_product_index',
@gamort
gamort / test.php
Created December 20, 2016 20:29
Modified controller override checker for Magento - only shows actual overrides
<?php
# test.php => (http://mysite.dev/test.php)
ini_set('display_errors',1);
error_reporting(E_ALL^E_STRICT);
include 'app/Mage.php';
Mage::setIsDeveloperMode(true);
Mage::app();
@gamort
gamort / magento1_enterprise_index_diagnostics.sql
Created October 6, 2016 17:26 — forked from mttjohnson/magento1_enterprise_index_diagnostics.sql
Magento 1.x Enterprise Partial Indexing Diagnostics Toolset
-- When products are added/removed from a category this table stores all the relation data
select * from catalog_category_product where product_id = '24526';
-- The index that is used for presenting products in a category on the frontend
select * from catalog_category_product_index where product_id = '24526';
-- The change log table used for Magento EE partial index functionality
select * from catalog_category_product_index_cl where product_id = '24526' and version_id > (select version_id from enterprise_mview_metadata where changelog_name = 'catalog_category_product_index_cl');
#!/bin/bash
# ------------------------------
# ----- Start Shero Designs customization header for aoe scheduler
# Calculate log prefix string once to show date/time when execution begins
LOGDATE=$(date +%F_%T)
# Simple logging message, begins with date/time - followed by nanoseconds for precision and then a string.
# Allows for easy grep/searching of a logfile
echo "$LOGDATE $(date +%N) Starting execution of scheduler_cron.shero.sh"