2014-07-22

Move category

$category = Mage::getModel('catalog/category')->load($idCategoryForMoving);
$category->move($idParentCategory, $idAfterCategory);

Getting filterable attributes in category

Getting filterable attributes from layered navigation
$category = Mage::registry('current_category');
$products = $category->getProductCollection();

$appliedFilters = Mage::getSingleton('catalog/layer')->getFilterableAttributes();
foreach ($appliedFilters as $filter) {
  if ($value = $this->getRequest()->getParam($filter->getAttributeCode())) {
      $products->addFieldToFilter($filter->getAttributeCode(), $value);
  }
}
Method getFilterableAttributes returns all available attributes for filtering. Then in foreach we check if an attribute has been selected by user, we add it to the filter.

2014-07-17

Increase the size of a VDI file

You can only increase size
VBoxManage modifyhd YourFile.vdi --resize 32240

2014-07-16

Include third party libraries

For including third party libraries from lib folder
require_once(Mage::getBaseDir('lib') . '/simple_html_dom.php');