Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Demoli's full-sized avatar

Neil Aitken Demoli

View GitHub Profile
SKYWIRE.HomeSlider = (function () {
function setup() {
$('.home-slider').anythingSlider({
theme: 'minimalist-round',
buildStartStop: false,
easing: 'easeOutSine',
animationTime: 1400,
hashTags: false,
onInitialized: function (event, slider) {
@Demoli
Demoli / gist:3969965
Created October 28, 2012 21:20
Example route config
'router' => array(
'routes' => array(
'login' => array(
'type' => 'Literal',
'options' => array(
// Change this to something specific to your module
'route' => '/login',
'defaults' => array(
// Change this value to reflect the namespace in which
// the controllers for your module are found
Replace lines 84 - 85 with:
$skinUrl = $this->getSkinUrl($item['name']);
$joinDir = strpos($skinUrl, 'skin') !== false ? 'skin' : 'media';
$chunks=explode('/' . $joinDir, $this->getSkinUrl($item['name']),2);
$lines[$if]['stylesheet'][] = "/".$webroot.$joinDir.$chunks[1];
Mage::getModel('catalog/category')->addFieldToSelect('*')->load($categoryId);
@Demoli
Demoli / Data.php
Created August 8, 2012 09:42
Fix for admin config save bug
File: Mage_Adminhtml_Model_Config_Data
Line: 135
Change to:
$backendClass = is_object($fieldConfig) ? $fieldConfig->backend_model : false;
@Demoli
Demoli / dev_test.php
Created March 16, 2012 10:53 — forked from valguss/dev_test.php
Thoughts on best way to test subdomain
<?php
//faster using strpos
$staging_subdomains = array(
's1',
's2',
's3',
's4',
's5',
'mac',
'local',
@Demoli
Demoli / Abstract.php
Created March 9, 2012 13:43
Double dispatch error
abstract class Skywire_PressRelease_Test_Controller_Adminhtml_Abstract
extends EcomDev_PHPUnit_Test_Case_Controller
{
const FAKE_USER_ID = 999999999;
/**
* Login to the admin store
*
* @return null
*/