Skip to content

Instantly share code, notes, and snippets.

View MauroNigrele's full-sized avatar
🎯
Focusing

Mauro Nigrele MauroNigrele

🎯
Focusing
View GitHub Profile
@MauroNigrele
MauroNigrele / magento-date-helper.php
Last active January 30, 2016 21:35
Helpfull Date Helper for Magento 1
<?php
class {Vendor}_{Module}_Helper_Date extends Mage_Core_Helper_Abstract
{
// Format Dates
const ZEND_DATE_FORMAT_DB_DATE = 'y-MM-dd';
const ZEND_DATE_FORMAT_DB_DATETIME = 'y-MM-dd HH:mm:ss';
const ZEND_DATE_FORMAT_DB_TIME = 'HH:mm:ss';
const ZEND_DATE_FORMAT_XSD_DATETIME = 'y-MM-ddTHH:mm:ss';
const ZEND_DATE_FORMAT_TEXT_FULL = 'EEEE dd/M TT';
@MauroNigrele
MauroNigrele / simple-profiler-logger.php
Last active January 30, 2016 23:08
Simple Magento Profiler Logger
<?php
/**
* USAGE: include on index.php | api.php | cron.php at the end of the file
**/
// Colors REF
// http://stackoverflow.com/questions/3696430/print-colorful-string-out-to-console-with-python?lq=1
// Profile