some usful snipetts for magento