Skip to content

Instantly share code, notes, and snippets.

Charlie MageMechanic

Block or report user

Report or block MageMechanic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MageMechanic / 0_reuse_code.js
Created Nov 11, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
MageMechanic / Dockerfile
Last active Mar 14, 2017
Docker + PHP 7.0.0RC6 + xdebug + docker-spy for Magento 1.9 development
View Dockerfile
# Charles Hilditch <>
# Tested on Magento with MageMechanic_PhpSeven module installed for PHP7 compatibility.
FROM php:7-apache
RUN apt-get update && apt-get install -y vim libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libicu-dev mlocate
RUN chown -R www-data:www-data /var/www/html
RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/lib/x86_64-linux-gnu
RUN docker-php-ext-install gd mysqli pdo pdo_mysql mcrypt intl
RUN cp /usr/src/php/php.ini-development /usr/local/etc/php/php.ini && sed -i.bak 's/\;error_log = php_errors.log/error_log = \/var\/log\/php_errors.log/' /usr/local/etc/php/php.ini && touch /var/log/php_errors.log
RUN a2enmod rewrite && apachectl restart
MageMechanic / PHP7 Magento 1.9 core
Last active Apr 9, 2017
Patch to get Magento 1.9 working with >= PHP 7.0.0 RC 6
View PHP7 Magento 1.9 core

Patch using method below or if you don't want to patch a core file, see this Magento extension that does the same thing but correctly overrides the core file:

# run in magento root directory

# one-liner to apply patch using wget
wget -qO- '' | patch -p0

# one-liner to apply patch using curl
You can’t perform that action at this time.