Skip to content

Instantly share code, notes, and snippets.

View petemcw's full-sized avatar

Pete McWilliams petemcw

View GitHub Profile
@molotovbliss
molotovbliss / gist:7572997
Created November 20, 2013 23:18
Magento Upgrade EE: When using shell/url_migration_to_1_13.php this greatly increased the completion time by 4x-5x.
ALTER TABLE `enterprise_url_rewrite_redirect`
ADD INDEX `redirect_id` (`redirect_id`) ;
ALTER TABLE `enterprise_url_rewrite`
ADD INDEX `request_path` (`request_path`) ;
@petemcw
petemcw / gist:1169053
Created August 24, 2011 20:06 — forked from davidalexander/gist:1086455
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@stefanfoulis
stefanfoulis / osx_developer_installation.rst
Last active December 23, 2019 02:32
Instructions on how to setup an OSX developer machine for (python/django) development

OSX Developer System installation

This guide assumes a fresh install of Mac OSX 10.7 Lion.

Brew User

@petemcw
petemcw / 01-SolrSetup.md
Last active January 18, 2020 03:45
Basic configuration steps for setting up Solr 3.x on CentOS/RHEL 6.4 -- specifically for use with Magento Enterprise

Installing Solr on CentOS/RHEL 6

From the Apache Software Foundation, "Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON, Ruby, and Python APIs, hit highlighting, faceted search, caching, replication, and a web administration interface." Magento has had built-in support for Solr since Enterprise verion 1.8.

The following instructions show how to complete a basic installation and configuration of Apache Solr for use with Magento Enterprise on CentOS/RHEL 6. These instructions the Java JDK with Tomcat rather than jetty.

Note: Solr should be on a dedicated server if possible, especially for large installations, as it can be resource intensive

Install Java JDK

@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)
@petemcw
petemcw / docker_instructions.md
Last active October 22, 2020 21:24
Mac OS X Docker Instructions using Dinghy

Docker Installation

A great way to get Docker running smoothly on OS X is to use the awesome project Dinghy. It is basically:

Docker on OS X with batteries included, aimed at making a more pleasant local development experience. Runs on top of docker-machine.

Some of the benefits are:

  • Faster volume sharing using NFS rather than built-in virtualbox/vmware file shares
  • Filesystem events work on mounted volumes
@mojombo
mojombo / vwilight.vim
Created January 26, 2011 03:23
vwilight.vim: A TRUE Twilight color theme for Vim
" Vim color file
" Converted from Textmate theme Twilight using Coloration v0.2.5 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@petemcw
petemcw / sphp
Created October 15, 2019 20:10
Simple script for changing Homebrew installed PHP versions
#!/usr/bin/env bash
################################################################################
#
# MacOS Homebrew-based PHP version switcher.
#
################################################################################
# Define read-only script variables
# -------------------------------------------------------------------------------
declare -r SPHP_BREW_PREFIX="$(brew --prefix | sed 's#/#\\\/#g')"
@petemcw
petemcw / magento_sql_snippets.md
Created July 21, 2011 19:41
Magento SQL Snippets

Magento SQL Snippets

Clear Temporary Data Tables

TRUNCATE `log_customer`;
TRUNCATE `log_quote`;
TRUNCATE `log_summary`;
TRUNCATE `log_url`;
TRUNCATE `log_url_info`;