Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// check: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/db-repair-tool | |
/** | |
* 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" https://gist.github.com/Rud5G/2316255 | |
" | |
" mkdir -p ~/.vim/{backup,syntax,tmp} | |
" | |
set autoindent " lines following an indented line will have the same indentation as the previous line. | |
set expandtab " resplace tabs with actuall spaces | |
set shiftwidth=4 " softtabs width 4. | |
set tabstop=4 " tabs are 4 spaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env bash | |
set -e -u | |
# Tooltip fix | |
# A script to fix themes files in Ubuntu 11.10 | |
# to have readable tooltips in applications such | |
# as eclipse. | |
# The script edits the gtk.css, settings.ini and gtkrc files | |
# Author: Victor Pillac | |
# http://victorpillac.wordpress.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Init framework | |
require 'app/Mage.php'; | |
Mage::app(); | |
// Factory methods to search for | |
$methods = array( | |
'Mage::helper', | |
'Mage::getModel', | |
'Mage::getResourceModel', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @see http://inchoo.net/ecommerce/magento/bestseller-products-in-magento/ | |
*/ | |
/** | |
* @author Branko Ajzele | http://activecodeline.com | [email protected] | |
* @license GPL | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @see http://colin.mollenhour.com/2009/06/04/adding-minimal-price-to-any-product-collection-in-magento/ | |
*/ | |
/* | |
* example product collection: | |
* $_products = Mage::getResourceModel('catalog/product_collection')->setStoreId($storeId); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$quote = Mage::getModel('sales/quote') | |
->setStoreId(Mage::app()->getStore('default')->getId()); | |
$product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product ID */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: Colin Mollenhour | |
# | |
# Usage: Run from the webroot, .htaccess-combined will be created. | |
dest='.htaccess-combined' | |
pwd=`pwd` | |
echo -n "" > $dest | |
while read -r file; do | |
loc=`dirname $file` |
OlderNewer