Skip to content

Instantly share code, notes, and snippets.

View andyhoman's full-sized avatar

Andy Homan andyhoman

View GitHub Profile
{% if customer.id == xxx %}
<a href="/admin/products/{{ product.id }}">Edit</a>
{% endif %}
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@domstubbs
domstubbs / ext.stash_breaker.php
Created November 23, 2012 09:11
Stash cache breaker extension for EE2 (See https://github.com/domstubbs/ee-stash-breaker for updates)
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* ExpressionEngine - by EllisLab
*
* @package ExpressionEngine
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2003 - 2011, EllisLab, Inc.
* @license http://expressionengine.com/user_guide/license.html
* @link http://expressionengine.com
@john-henry
john-henry / gist:3179683
Created July 26, 2012 01:07
Infinite Scroll & Masonry in ExpressionEngine
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
@moimikey
moimikey / gist:1441514
Created December 7, 2011 04:52
Creating a temporary chroot jail to successfully install APC via pecl on a Media Temple (ve) server running Plesk Parallels
[root@hertzberg ~]# pecl install apc
downloading APC-3.1.9.tgz ...
Starting to download APC-3.1.9.tgz (155,540 bytes)
.................................done: 155,540 bytes
54 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
@curtisblackwell
curtisblackwell / .gitignore
Created July 1, 2011 03:35
Above root .gitignore for developing ExpressionEngine sites on a Mac
## OS X GENERATED FILES
.DS_Store
Icon
Icon?
Thumbs.db
._*
.Spotlight-V100
.Trashes
## MISCELLANEOUS
#!/bin/bash
# Copyright (c) 2010 hearSAY, LLC @ http://gohearsay.com
# Author: Kevin Smith
#
# This script is meant to be installed in the web root directory
# and run immediately after an EE2 deployment. As long as it's
# installed in the web root, it can be executed from any working
# directory.
# VERY IMPORTANT: If you are running under a suPHP environment
<?php
/**
* Custom configuration bootstrap file for ExpressionEngine
*
* Place config.php in your site root
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php
* If you have moved your site root you'll need to update the require_once path
*
@danott
danott / pi.post_to_tumblr.php
Created June 14, 2010 01:32
Post to Tumblr from Expression Engine using the Tumblr API
<?php
/* Daniel Ott
* 13 June 2010
* A plugin that you can use to send stuff to Tumblr from Expression Engine
* using Tumblr's API
*
* Very minimal for right now. You could expand it to send categories using
* the API's "tags" option, send different types of posts, etc.
*
@kennethreitz
kennethreitz / memcache-dv.sh
Created April 22, 2010 05:55
Install memcache on a MediaTemple (dv)
wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
rpm --install rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install --enablerepo=rpmforge memcached
memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody
wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar -xvf memcache-2.2.5.tgz
cd memcache-2.2.5
phpize && ./configure --enable-memcache && make
cp /root/memcache-2.2.5/modules/memcache.so /usr/lib/php/modules/
echo extension=memcache.so >> /etc/php.ini