javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
This file contains 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
// Lightweight ZF Equalizer alternative | |
// Will make two or more HTML elements the same height | |
// Usage: eq2.makeEqual("[data-equalizer-watch='your_pattern']"); | |
var eq2 = { | |
Mx: 0, | |
makeEqual: function( data_eqlzr_watch ){ | |
$( data_eqlzr_watch ).each(function(){ | |
eq2.Mx = ( this.clientHeight > eq2.Mx ) ? this.clientHeight : eq2.Mx; | |
}); | |
$( data_eqlzr_watch ).css("height", eq2.Mx + "px"); |
This file contains 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
#!/usr/bin/env bash | |
echo ">>> Installing Mailhog" | |
# Download binary from github | |
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 | |
# Make it executable | |
chmod +x ~/mailhog |
This file contains 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
http://www.youtube.com/watch?v=-wtIMTCHWuI | |
http://www.youtube.com/v/-wtIMTCHWuI?version=3&autohide=1 | |
http://youtu.be/-wtIMTCHWuI | |
http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch?v%3D-wtIMTCHWuI&format=json | |
http://s.ytimg.com/yt/favicon-wtIMTCHWuI.ico |
This file contains 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
#!/usr/bin/env bash | |
echo ">>> Installing Mailhog" | |
# Download binary from github | |
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 | |
# Make it executable | |
chmod +x ~/mailhog |
This file contains 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
### MAGENTO DIRECTORIES | |
# Ignore everything in media, except for the htaccess files | |
# Also include the Lazy Catalog Images (LCI) .htaccess if that's installed | |
# (https://github.com/AOEpeople/Aoe_LazyCatalogImages) | |
/media/* | |
!/media/.htaccess | |
!/media/customer/.htaccess | |
!/media/downloadable/.htaccess | |
!/media/catalog/product/LCI/.htaccess |
This file contains 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
// # Block Grid | |
// | |
// Technique adapted from Foundation 5 for Bootstrap 3.0.3 to at least 3.3.1. | |
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss | |
// | |
// # Example Usage | |
// | |
// To produce a grid of 2 items per row on an extra-small screen, and 3 items | |
// per row on a small screen: | |
// |
This file contains 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 | |
# | |
# Example showing use of getopt detection and use of GNU enhanced getopt | |
# to handle arguments containing whitespace. | |
# | |
# Written in 2004 by Hoylen Sue <[email protected]> | |
# | |
# To the extent possible under law, the author(s) have dedicated all copyright and | |
# related and neighboring rights to this software to the public domain worldwide. | |
# This software is distributed without any warranty. |
- Add this file to application/libraries (or, if you are already extending the Validator class, add the contents there).
- Remove Validator alias from config/application.php in order to avoid conflicts.
- Add
"required_if_attribute" => "The :attribute field is required."
to application/language/[language]/validation.php.
Define the rule using:
required_if_attribute:[field],[operator],[value]