Skip to content

Instantly share code, notes, and snippets.

@shaibon
shaibon / gist:c9740a32f32131455643
Created September 26, 2015 17:50 — forked from croxton/gist:4073583
Install xdebug 2.2.0 for AMPPS on OSX
Grab the 'PHP Remote Debugging Client' (the pre-complied xdebug binary for OSX) from here:
http://code.activestate.com/komodo/remotedebugging/
Unzip it, find the folder that corresponds to the version of PHP you want to install it for and copy the xdebug.so file from there into your php extensions folder in the relevant PHP version directory. E.g. for PHP 5.4:
/Applications/AMPSS/php-5.4/lib/extensions/ext/
Now open PHP.ini in a text editor:
/Applications/AMPSS/php-5.4/etc/php.ini
@shaibon
shaibon / file_custom_option_script.php
Created September 25, 2015 09:48 — forked from varinen/file_custom_option_script.php
Dynamically adding a file type custom option to multiple products (IDs 100, 101, and 102) in Magento.
<?php
require_once 'app/Mage.php';
Mage::app('default');
$productIds = array(100, 101, 102);
$option = array(
'title' => 'Test Option',
'type' => 'file',
'is_require' => 1,
require 'formula'
class Varnish3 <Formula
url 'http://repo.varnish-cache.org/source/varnish-3.0.7.tar.gz'
homepage 'http://www.varnish-cache.org/'
md5 'aa63a7808d775c005d020c41f152b7af'
depends_on 'pkg-config' => :build
depends_on 'pcre' => :build

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name