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
# For safe keeping | |
# From https://journalxtra.com/web-development/fix-missing-images-size-fits-replacement/ | |
# Clever trick if you're working off a local dev copy and don't want to download all the media image to work | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$ | |
RewriteRule .* directory-path/replacement-image.jpg [L] |
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
/* | |
Generate a hierachical menu based on the page structure of your wordpress website. | |
Useful if your late in the game in generating a menu, or updating an old website. | |
If you don't understand what it does, don't use it. | |
*/ |
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
ALTER TABLE `core_metrics` MODIFY `total_amount` DECIMAL( 15, 4 ) ; | |
ALTER TABLE `shop_bundle_item_products` MODIFY `price_or_discount` DECIMAL( 15, 4 ) ; | |
ALTER TABLE `shop_extra_options` MODIFY `price` DECIMAL( 15, 4 ) ; | |
ALTER TABLE `shop_option_matrix_records` MODIFY `base_price` DECIMAL( 15, 4 ) ; | |
ALTER TABLE `shop_option_matrix_records` MODIFY `cost` DECIMAL( 15, 4 ) ; | |
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
find . -name '*.svg' -exec bash -c 'svg2png {} `basename {} .svg`.png' \; |
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
@media (min-width: 768px) and (max-width: 979px) { | |
.popover { | |
width:200px; | |
} | |
.popover-title { | |
padding: 4px 10px; | |
font-size: 14px; | |
line-height: 18px; | |
} | |
.popover-content { |
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
define("LIPSUM","bacon"); | |
$site = <<<EOF | |
Top Page | |
Sub Page 1 | |
Sub Page 2 | |
Sub Page 3 | |
Top Page 2 | |
Top Page 3 | |
Top Page 4 |
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
Handlebars.registerHelper('whatis', function(param, options) { | |
var label = options.hash.label ? options.hash.label + '=%o' : "%o"; | |
try { | |
console && console.log && console.log(label,param); | |
options.hash.show_options && console && console.log && console.log("options=%o",options); | |
} catch (ex) |
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
// {{compare unicorns ponies operator="<"}} | |
// I knew it, unicorns are just low-quality ponies! | |
// {{/compare}} | |
// | |
// (defaults to == if operator omitted) | |
// | |
// {{equal unicorns ponies }} | |
// That's amazing, unicorns are actually undercover ponies | |
// {{/equal}} | |
// (from http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/) |