Skip to content

Instantly share code, notes, and snippets.

@davekelly
davekelly / gist:3918937
Created October 19, 2012 15:42
Add Intercom.io snippet to Magento site
<?php
/*
* /app/design/frontend/default/your_theme/template/page/intercom-io.phtml
*/
// Settings for the intercom.io app.
if( $this->helper('customer')->isLoggedIn() ): ?>
<?php $customer = Mage::helper('customer')->getCustomer()->getData(); ?>
<script id="IntercomSettingsScriptTag">
@ChuckMac
ChuckMac / WordPress Plugin Activation Dependency Check
Created January 25, 2013 17:51
WordPress plugin depency check. Check if another plugin is installed before allowing yours to be installed
/**
* Activation Class
**/
if ( ! class_exists( 'WC_CPInstallCheck' ) ) {
class WC_CPInstallCheck {
static function install() {
/**
* Check if WooCommerce & Cubepoints are active
**/
if ( !in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ||
@jbanety
jbanety / upgrade-mamp-php-7.sh
Last active March 13, 2019 04:23
Upgrade MAMP PHP to 7.0.6 with Homebrew formulas
# Brew Formulas
brew update
brew install libpng jpeg lzlib freetype readline openssl imap-uw curl postgresql libxml2 gettext libxslt mcrypt homebrew/dupes/libiconv icu4c expat
# MAMP
mkdir -p /Applications/MAMP/bin/php/php7.0.6/include
cd /Applications/MAMP/bin/php/php7.0.6/include
# Download PHP
wget -O php-7.0.6.tar.bz2 http://fr2.php.net/get/php-7.0.6.tar.bz2/from/this/mirror