Skip to content

Instantly share code, notes, and snippets.

View yousefcisco's full-sized avatar

Yousef Cisco yousefcisco

View GitHub Profile
### Keybase proof
I hereby claim:
* I am yousefcisco on github.
* I am yousefcisco (https://keybase.io/yousefcisco) on keybase.
* I have a public key ASC_uyd1iG85xr3a03qiT0ur4QSBZbY0HJza7zoyjde9-Ao
To claim this, I am signing this object:
Verifying that +yousefcisco is my blockchain ID. https://onename.com/yousefcisco
@yousefcisco
yousefcisco / config.xml
Created November 1, 2015 12:33
Example config to add a new Magento page type and disable one_column form being default
<?xml version="1.0"?>
<config>
...
<global>
<page>
<layouts>
<vendor_page module="page">
<label>Vendor Default</label>
<template>page/html.phtml</template>
<layout_handle>vendor_page</layout_handle>
@yousefcisco
yousefcisco / BaseBlocker.php
Last active November 13, 2015 11:36
Example rewrite to disable Magento from falling back to base/default
<?php
class Vendor_BaseBlocker_Rewrite_Mage_Core_Model_Design_Package extends Mage_Core_Model_Design_Package
{
/**
* Magento's function with additional condition to around falling back to base/default
*
* @author Wenjiang Xu <wenjiang.xu@ampersandcommerce.com>
*/
protected function _fallback($file, array &$params, array $fallbackScheme = array(array()))
{
@yousefcisco
yousefcisco / gist:db7db210026c08301744
Created October 11, 2014 21:47
Backbone.stickit handler that allows function as select label
Backbone.Stickit.addHandler({
selector: 'select',
events: ['change'],
update: function($el, val, model, options) {
var optList,
selectConfig = options.selectOptions,
list = selectConfig && selectConfig.collection || undefined,
isMultiple = $el.prop('multiple');
// If there are no `selectOptions` then we assume that the `<select>`