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
<?php | |
require_once('app/Mage.php'); | |
umask(0); | |
Mage::app(); | |
$emails = array(); | |
$orders = Mage::getModel('sales/order')->getCollection(); | |
foreach ($orders as $order) { | |
$emails[] = $order->getCustomerEmail(); |
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
$$('.validate-email').each(function(input){ | |
input.observe('change', function(e){ | |
this.value = this.value.replace(/^\s+|\s+$/g,""); | |
}); | |
}); |
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
for d in */ ; do | |
(cd $d && git stash) | |
done |
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
# Database credentials | |
DB_USER="" | |
DB_PASS="" | |
DB_HOST="" | |
DB_NAME="" | |
# Database dump | |
mysqldump --user=$DB_USER --password=$DB_PASS --host=$DB_HOST $DB_NAME > $(date +"%d-%m-%Y").sql | |
# Files backup |
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
# Script for parsing Google PageSpeed optimized content MANIFEST | |
# Copyright (C) 2016 Tomasz Silpion Gregorczyk - All Rights Reserved | |
file="MANIFEST" | |
while IFS= read line | |
do | |
#strip file paths | |
IFS=':' read -r src protocol url <<EOF | |
$line |
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
<?php | |
define('WP_USE_THEMES', false); | |
require('./wp-load.php'); | |
$args = array('post_type' => 'product', 'posts_per_page' => -1); | |
$loop = new WP_Query($args); | |
while ($loop->have_posts()) : $loop->the_post(); |
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
<?php | |
require('./wp-load.php'); | |
$wpo_wcpdf = WPO_WCPDF(); | |
$pdf = $wpo_wcpdf->export->get_pdf('invoice', array($order_id)); | |
header("Content-type:application/pdf"); | |
echo $pdf; |
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
# Magento2 shell script shorthand for redeployment | |
php bin/magento setup:upgrade | |
cd tools && gulp clean && cd .. | |
php bin/magento setup:di:compile | |
php bin/magento setup:static-content:deploy | |
cd tools && gulp styles && cd .. | |
chmod -R 775 var | |
chmod -R 775 pub/static |
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
location ^~ /media/catalog/product/cache/ { | |
try_files $uri @nocache; | |
} | |
location @nocache { | |
rewrite ^/(media/catalog/product)/(.*/.*/.*/.*)/(.*/.*/.*) /$1/$3 redirect; | |
} |
OlderNewer