Skip to content

Instantly share code, notes, and snippets.

@cristian0
cristian0 / bash.sh
Last active May 22, 2024 13:33
Warming cache site by sitemap
curl -sS https://example.com/sitemap.xml | pcregrep -o1 "<loc>([^<]+)</loc>" | xargs -n1 -r -P60 curl -sS -o /dev/null -w "%{http_code}\t%{time_total}\t%{url_effective}\n"
@cristian0
cristian0 / magento19_attributes_updates.php
Last active September 15, 2017 07:20
Magento update multiple attribute product cases
// Case 1
$product=Mage::getModel('catalog/product')->load($id);
$product->setSpecialFromDate('2010-10-28');
// below code use for time format
$product->setSpecialFromDateIsFormated(true);
$product->getResource()->saveAttribute($product, 'special_from_date');
// Using Product Collection: