Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
(function($){ | |
$.isBlank = function(string){ | |
return(!string || $.trim(string) === ""); | |
}; | |
})(jQuery); | |
$.isBlank(" ") //true | |
$.isBlank("") //true | |
$.isBlank("\n") //true | |
$.isBlank("a") //false |
<?php | |
// check if hashed password is SHA1 and update as necessary, see function comments | |
add_filter( 'check_password', 'check_sha1_password', 10, 4 ); | |
/** | |
* Check if a user has a SHA1 password hash, allows login if password hashes match, then updates password hash to wp format | |
* | |
* Hooks into check_password filter, mostly copied from md5 upgrade function with pluggable.php/wp_check_password | |
* | |
* @param string $check |
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
echo Install and Set San Francisco as System Font | |
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
echo Install Homebrew, Postgres, wget and cask | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
cd $HOME | |
ln -s `which php54` ~/bin/php | |
export PATH=$HOME/bin:$PATH | |
curl -sS https://getcomposer.org/installer | php54 | |
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
source $HOME/.bash_profile |
//This script prevents Marketo form submission if a user enters non-business email (Gmail, Hotmail, Yahoo, etc.) | |
//It will work on any page with a Marketo form, and runs when the form is ready | |
//For further info, please see Marketo form documentation, http://developers.marketo.com/documentation/websites/forms-2-0/ | |
//Prepared by Ian Taylor and Murtza Manzur on 9/9/2014 | |
<script> | |
(function (){ | |
// Please include the email domains you would like to block in this list | |
var invalidDomains = ["@gmail.","@yahoo.","@hotmail.","@live.","@aol.","@outlook."]; |
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Academic Free License (AFL 3.0) | |
* that is bundled with this package in the file LICENSE_AFL.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/afl-3.0.php |
<?php | |
/** | |
* Verbose Beautified Date Range | |
* | |
* @access public | |
* @param mixed $start_date | |
* @param mixed $end_date | |
* @return $date_range (beautified date range) | |
* @license WTFPL | |
* |
<?php | |
add_action( 'phpmailer_init', '_add_string_attachments' ); | |
function _add_string_attachments( $phpmailer ) { | |
// the previous attachment will fail since it's not an actual file | |
// we will use the error to attach it as a string | |
if ( '' !== $phpmailer->ErrorInfo ) { | |
// error info | |
$error_info = $phpmailer->ErrorInfo; |