Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Meves stereoscott

View GitHub Profile
@stereoscott
stereoscott / application.rb
Created Sep 5, 2012
Redirect Mobile User-Agent to Subdomain as Rack Middleware (in Rails)
View application.rb
module YourApp
class Application < Rails::Application
# ...
config.middleware.insert_before "Rack::Cache", "SubdomainRedirect"
# ...
end
end
View gist:350766
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
View gist:350759
<?php
class Stereo_Catalog_Block_Product_Featured extends Mage_Catalog_Block_Product_Abstract
{
protected $_productsCount = null;
const DEFAULT_PRODUCTS_COUNT = 12;
protected function _beforeToHtml()
{