Skip to content

Instantly share code, notes, and snippets.

View mehdichaouch's full-sized avatar
🤖
Happiness Developer

Mehdi Chaouch mehdichaouch

🤖
Happiness Developer
View GitHub Profile
@mehdichaouch
mehdichaouch / Ogone_Fill_CB_-_Bookmarklet.js
Created November 29, 2016 10:23
Bookmarklet to fill Ogone CB
(function(){document.getElementById('Ecom_Payment_Card_Number').value=4111111111111111;document.getElementById('Ecom_Payment_Card_ExpDate_Month').selectedIndex=12;document.getElementById('Ecom_Payment_Card_ExpDate_Year').selectedIndex=2;document.getElementsByName('Comp_Expirydate')[0].value=201712;document.getElementById('Ecom_Payment_Card_Verification').value=123;document.getElementById('submit3').click();})();
@mehdichaouch
mehdichaouch / store_emulation.php
Last active November 30, 2016 14:42
Magento - Store emulation
<?php
// http://inchoo.net/magento/emulate-store-in-magento/
$appEmulation = Mage::getSingleton('core/app_emulation');
//Start environment emulation of the specified store
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
/*
* Any code thrown here will be executed as we are currently running that store
@mehdichaouch
mehdichaouch / git-remove-merged-branch.sh
Last active December 8, 2016 15:56
Git Clean Branch from remote
#!/bin/bash
# src : https://gist.github.com/mehdichaouch/70d0dffdb34462cdf2716d4acb3a5cfc
# http://stackoverflow.com/a/9739058
current_branch=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
if [ "$current_branch" != "master" ]; then
echo "WARNING: You are on branch $current_branch, NOT master."
fi
echo -e "Fetching merged branches...\n"
@mehdichaouch
mehdichaouch / gitinspector.sh
Created April 25, 2017 19:51
Gitinspector - The statistical analysis tool for git repositories
#!/bin/bash
# https://github.com/ejwa/gitinspector
cd /var/www/gitinspector
export LANG=fr
REPO=/var/www/ESD3R/
DEST=~
@mehdichaouch
mehdichaouch / github-compare-branch.txt
Created April 26, 2017 08:03
How to compare branches in Github
Compare Github branches
https://github.com/PayEx/PayEx.Magento/compare/v3.0.2...v3.0.3
@mehdichaouch
mehdichaouch / ignores.php
Created May 3, 2017 11:00 — forked from SmetDenis/ignores.php
Ignores for PHP inspections
<?php
// https://pear.php.net/manual/en/package.php.php-codesniffer.advanced-usage.php
// @codingStandardsIgnoreLine
// @codingStandardsIgnoreFile
// @codingStandardsIgnoreStart
// @codingStandardsIgnoreEnd
// https://phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.codeCoverageIgnore
// @codeCoverageIgnore
@mehdichaouch
mehdichaouch / mage.php
Created May 12, 2017 14:56
Magento - Log all events on action
<?php
# change method in mage.php
public static function dispatchEvent($name, array $data = array())
{
Mage::log('Event: ' . $name); //not using Mage::log, as
//file_put_contents('/tmp/test.log','Dispatching '. $name. "\n",FILE_APPEND); //poor man's log
Varien_Profiler::start('DISPATCH EVENT:'.$name);
$result = self::app()->dispatchEvent($name, $data);
@mehdichaouch
mehdichaouch / sortselectbox.js
Created June 19, 2017 22:04
Magento - jQuery function to sort configurable product attribute options by value
jQuery.fn.sortOptionsByValue = function(){
jQuery(this).each(function(){
var op = jQuery(this).children("option");
op.sort(function(a, b) {
return a.value > b.value ? 1 : -1;
});
return jQuery(this).empty().append(op).val('').attr({selected: 'selected'});
});
};
@mehdichaouch
mehdichaouch / slack_hide_team.js
Last active May 23, 2021 16:56
Slack bookmarklet to hide the team name in sidebar
(function(){var style=document.createElement("style"),styleContent=document.createTextNode("#team_menu{display:none !important;}");style.appendChild(styleContent);document.getElementsByTagName("head")[0].appendChild(style);})();

DEVELOPER PLUS

87 Multiple Choice items (85 scored, 2 unscored)
120 minutes to complete the exam
Based on Magento Community Edition 1.9 and Magento Enterprise Edition 1.14

Passing score

Magento Certified Developer Plus exam: For sections 11 & 12 combined a score of 7 or higher AND meet the overall passing score of 48 or higher

 5%  1-Basics (config, events, cron, translations, theme, locating template/layout file)

6% 2-Request Flow