Skip to content

Instantly share code, notes, and snippets.

View tonyoconnell's full-sized avatar

Tony O'Connell tonyoconnell

View GitHub Profile
@tonyoconnell
tonyoconnell / gist:3337622
Created August 13, 2012 07:04
Set number of columns in product listing
<reference name="product_list">
<action method="setColumnCount"><columns>5</columns></action>
</reference>
@tonyoconnell
tonyoconnell / gist:2351252
Created April 10, 2012 13:11
Reset File Permissions Magento
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 mage
{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
<div class="header-top">
<div class="top-left">
<div class="language">
<?php echo $this->getChildHtml('store_language') ?>
</div>
</div>
@tonyoconnell
tonyoconnell / gist:2023032
Created March 12, 2012 16:10
Google Plus
<div class="social-top">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone align="right"></g:plusone>
</div>
@tonyoconnell
tonyoconnell / gist:2022960
Created March 12, 2012 15:59
Add This Pinterest
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
@tonyoconnell
tonyoconnell / gist:2013665
Created March 10, 2012 22:30
Featured Products Block
{{block type="catalog/product_list" column_count="5" category_id="2" template="catalog/product/listhome.phtml"}}
@tonyoconnell
tonyoconnell / gist:2011725
Created March 10, 2012 15:14
Get Skin URL
<img class="cards" src="<?php echo $this->getSkinUrl('images/logo-credit-cards.png'); ?>"/>
var gulp = require('gulp'), // Gulp
jade = require('gulp-jade'), // Jade
stylus = require('gulp-stylus'), // Stylus
autoprefixer = require('gulp-autoprefixer'), // Autoprefixer
csso = require('gulp-csso'), // CSSO
imagemin = require('gulp-imagemin'), // Imagemin
concat = require('gulp-concat'), // Concat
cache = require('gulp-cache'); // Cache
browsersync = require('browser-sync'); // Browser-Sync