Skip to content

Instantly share code, notes, and snippets.

View Rud5G's full-sized avatar
🏡
Working remotely

Rudger Rud5G

🏡
Working remotely
View GitHub Profile
<?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.
@Rud5G
Rud5G / magento-db-repair-tool-1.0.php
Created March 20, 2012 16:31
Magento Database Repair Tool 1.0
<?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:
@Rud5G
Rud5G / vimrc.vim
Last active September 28, 2020 22:21
dotfile: .vimrc
"
" 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
@Rud5G
Rud5G / clients.md
Created April 8, 2012 03:02 — forked from defunkt/clients.md
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@Rud5G
Rud5G / fix-theme.sh
Last active January 14, 2019 16:06
Fix Tooltip Background Color Zend Studio
#/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
@Rud5G
Rud5G / makePhpstormMap.php
Created June 5, 2012 18:07 — forked from colinmollenhour/makePhpstormMap.php
Generate map of factory method arguments to resolved class names for Magento projects
<?php
// Init framework
require 'app/Mage.php';
Mage::app();
// Factory methods to search for
$methods = array(
'Mage::helper',
'Mage::getModel',
'Mage::getResourceModel',
@Rud5G
Rud5G / bestseller.phtml
Created June 5, 2012 18:44
inchoo.net/bestseller-products-in-magento
<?php
/**
* @see http://inchoo.net/ecommerce/magento/bestseller-products-in-magento/
*/
/**
* @author Branko Ajzele | http://activecodeline.com | branko.ajzele@surgeworks.com
* @license GPL
*/
@Rud5G
Rud5G / bestseller-minimal-price.php
Created June 5, 2012 18:53
snippet: colinmollenhour/adding-minimal-price-to-any-product-collection-in-magento
<?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);
*/
@Rud5G
Rud5G / gist:2877942
Created June 5, 2012 21:08 — forked from brankoajzele/gist:2781404
Programatically create Magento order with tablerate shipping
<?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 */
@Rud5G
Rud5G / buildhtaccess.sh
Created June 5, 2012 22:34 — forked from colinmollenhour/buildhtaccess.sh
.htaccess combiner
#!/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`