Skip to content

Instantly share code, notes, and snippets.

View stereoscott's full-sized avatar

Scott Meves stereoscott

View GitHub Profile
@stereoscott
stereoscott / application.rb
Created September 5, 2012 04:55
Redirect Mobile User-Agent to Subdomain as Rack Middleware (in Rails)
module YourApp
class Application < Rails::Application
# ...
config.middleware.insert_before "Rack::Cache", "SubdomainRedirect"
# ...
end
end
<?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
<?php
class Stereo_Catalog_Block_Product_Featured extends Mage_Catalog_Block_Product_Abstract
{
protected $_productsCount = null;
const DEFAULT_PRODUCTS_COUNT = 12;
protected function _beforeToHtml()
{