Skip to content

Instantly share code, notes, and snippets.

View federivo's full-sized avatar

Federico Rivollier federivo

View GitHub Profile
class Mage_Paypal_Block_Standard_Redirect extends Mage_Core_Block_Abstract
{
protected function _toHtml()
{
$standard = Mage::getModel('paypal/standard');
$form = new Varien_Data_Form();
$form->setAction($standard->getConfig()->getPaypalUrl())
->setId('paypal_standard_checkout')
->setName('paypal_standard_checkout')
# Basic text search with relevancy for MongoDB.
# See http://blog.tty.nl/2010/02/08/simple-ranked-text-search-for-mongodb/
# Copythingie 2010 - Ward Bekker - ward@tty.nl
#create (or empty) a docs collection
doc_col = MongoMapper.connection.db('example_db').collection('docs')
doc_col.remove({})
#add some sample data
doc_col.insert({ "txt" => "it is what it is"})
@federivo
federivo / gist:5513090
Created May 3, 2013 19:23
Git: List all files modified between 2 commits
git diff-tree --no-commit-id --name-only -r <HASH1> <HASH2>
@federivo
federivo / gist:4060609
Created November 12, 2012 17:18 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt