This file contains hidden or 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/sh | |
cd ~/www/magento | |
# Pull main repo | |
git pull --no-edit origin master | |
# Update submodules | |
git submodule update --recursive | |
git submodule update --init --recursive |
This file contains hidden or 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 | |
ini_set('display_errors', '1'); | |
error_reporting(E_ALL); | |
// Bootstrap Magento | |
require '../magento/app/Mage.php'; | |
Mage::app('admin', 'store'); | |
try{ | |
$catalogPriceRule = Mage::getModel('catalogrule/rule'); |
This file contains hidden or 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 | |
$errand = foo(); | |
$order = bar(); | |
// Email the customer a receipt | |
$mail = Mail::send('returns.emails.approved', array('data' => 'to', 'the' => 'view'), function($message) use ($errand, $order) | |
{ | |
// The "use" keyword allows us to access external variables in our anonymous function | |
This file contains hidden or 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 | |
/** | |
* Helper function to reformat arrays. | |
* @see https://gist.github.com/Sleavely/2c1aa7ba13da80dfeb43 | |
* | |
* @param array $source | |
* The multidimensional array where each input field is an array | |
* @param array $arrays | |
* A list of which keys to include in the output |
This file contains hidden or 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
From 3ec96e871d2e561faeef82524ed91bb98698f6a1 Mon Sep 17 00:00:00 2001 | |
From: Joakim Hedlund | |
Date: Thu, 12 Jun 2014 18:44:52 +0200 | |
Subject: [PATCH] Parse and tuck away minimap colors | |
--- | |
app/libraries/POT/OTS_ItemsList.php | 68 ++++++++++++++++++++++++++++++++----- | |
1 file changed, 59 insertions(+), 9 deletions(-) | |
diff --git a/app/libraries/POT/OTS_ItemsList.php b/app/libraries/POT/OTS_ItemsList.php |
This file contains hidden or 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
/* New customers and all their orders within that month */ | |
SELECT | |
p.increment_id, | |
p.store_id, | |
p.created_at, | |
p.state, | |
p.customer_firstname, | |
p.customer_lastname, | |
p.customer_email, | |
(p.base_subtotal + p.base_shipping_amount) AS grandtotal_minus_tax, |
This file contains hidden or 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
[role=navigation] { | |
margin-bottom: 1px; | |
} | |
[role=main] > div { | |
background-color: white; | |
border-left: 1px solid #d1d1d1; | |
border-right: 1px solid #d1d1d1; | |
box-sizing: border-box; | |
margin: 0 auto; | |
padding: 1em; |
This file contains hidden or 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 | |
function mymodule_form($form, &$form_state) { | |
// [...] | |
$form['attachment'] = array( | |
'#type' => 'file', | |
'#title' => t('Attachment'), | |
); | |
This file contains hidden or 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 | |
print '<meta charset="utf8" /><pre>'; | |
require_once('oauth.php'); | |
$settings = array( | |
'oauth_access_token' => "", | |
'oauth_access_token_secret' => "", | |
'consumer_key' => "", | |
'consumer_secret' => "" | |
); |
This file contains hidden or 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
(function(){ | |
document.body.appendChild(document.createElement('script')).src='http://premailer.dialect.ca/inc/bookmarklet-1.0.js'; | |
})(); |