Skip to content

Instantly share code, notes, and snippets.

View avocadoslab's full-sized avatar
🖥️
In relationship with console.log();

Avocados Lab avocadoslab

🖥️
In relationship with console.log();
View GitHub Profile
@avocadoslab
avocadoslab / dataflow-export-timestamp.php
Created May 16, 2017 22:11 — forked from tegansnyder/dataflow-export-timestamp.php
Programmatically running a Magento Dataflow Profile export and appending timestamp to filename
<?php
require_once('app/Mage.php');
umask(0);
Mage::app();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
ini_set('memory_limit', '2048M');
$profile_id = 44;
$profile = Mage::getModel("dataflow/profile")->load($profile_id);
@avocadoslab
avocadoslab / releaseNotes.js
Created March 23, 2017 15:19 — forked from nadavspi/releaseNotes.js
toddbc's release notes helpers
// All non-merge commits
reg = /^(.+?)(\n|$)/; ' * ' + Array.prototype.slice.call(document.querySelectorAll('.commit-message a')).map(el => el.title).filter(title => title && title.indexOf('Merge') !== 0).map(title => { var mm = title.match(reg); return mm && mm[1]; }).join("\n * ");
// Only merge commits
reg = /^[^#]+(#[0-9]+)[^\n]+\n\n((?:.|\n)+)$/; Array.prototype.slice.call(document.querySelectorAll('.commit-message a')).map(el => el.title).filter(title => title.indexOf('Merge') === 0).map(title => { var mm = title.match(reg); return mm && mm[2] + ' (' + mm[1] + ')'; }).join("\n * ");
@avocadoslab
avocadoslab / magento.md
Created November 7, 2016 17:12 — forked from manojiksula/magento.md
Magento Code Snippet

Common

Magento : Get Base Url , Skin Url , Media Url , Js Url , Store Url and Current Url

Get Url in phtml files

  1. Get Base Url :
	Mage::getBaseUrl();
@avocadoslab
avocadoslab / gist:68d778526214072815d3
Created March 17, 2016 21:21
Regex for detecting variations on PO Box
var pobReg = /\bbox(?:\b$|([\s|\-]+)?[0-9]+)|(p[\-\.\s]?o.?[\-\s]?|post office\s)b(\.|ox)?/igm;
/*
Matches:
po box
p.o.b.
pob
p.o. box
po-box