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
@edkoster
edkoster / sandbox.php
Last active May 30, 2022 11:11
Magento 2 sanbox file
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
try {
require __DIR__ . '/app/bootstrap.php';
} catch (\Exception $e) {
echo $e->getMessage();
exit(1);

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

@Origame
Origame / isRetinaOrHighDensity.js
Created November 18, 2016 08:48
Retina & high density detect function
function isHighDensity(){
return ((window.matchMedia && (window.matchMedia('only screen and (min-resolution: 124dpi), only screen and (min-resolution: 1.3dppx), only screen and (min-resolution: 48.8dpcm)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3)').matches)) || (window.devicePixelRatio && window.devicePixelRatio > 1.3));
}
function isRetina(){
return ((window.matchMedia && (window.matchMedia('only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)').matches)) || (window.devicePixelRatio && window.devicePixelRatio >=
@hn-support
hn-support / block-version-control-on-nginx.md
Last active January 13, 2018 03:05
block version control directory on nginx
# Skip .git, .htpasswd etc
location ~ /\.(git|svn|ht) {
    return 404;
}
@hn-support
hn-support / block-version-control-on-apache2.md
Last active January 13, 2018 03:04
block version control directory on apache2
<Directorymatch "^/(.*/)*\.(git|svn)/">
  Order deny,allow
  Deny from all 
</Directorymatch>
@luizventurote
luizventurote / instagram_api.php
Created September 12, 2016 22:01 — forked from arturmamedov/instagram_api.php
Instagram API retrive access token with PHP curl
<?php
// yo can follow this guide to http://www.benrlodge.com/blog/post/how-to-generate-an-instagram-access-token#
#1 first you need to create a Client in Instgram Developer Dashboard
// https://www.instagram.com/developer/clients/manage/
#2 after you need to retrive a oAuth code for after get access_token
// https://www.instagram.com/developer/authentication/
// change the params with your one and open link in browser
@stefanmaric
stefanmaric / copy-to-clipboard-bookmarklet.md
Created September 7, 2016 20:54
Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard

Copy-to-clipboard Bookmarklet

Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.

This is the base javascript:

(function (text) {
  var node = document.createElement('textarea')
  var selection = document.getSelection()
@dfelton
dfelton / 000 - Installers.md
Last active July 4, 2019 22:18
Magento 1.9.X Installer scripts
@evgv
evgv / mage_disable_compilation.md
Last active June 14, 2017 23:20
Magento. Disable compilation.

Via Admin Panel

Navigate to System > Tools > Compilation page and click on Disable button
Navigate to System > Cache Management screen and use Flush Cache button.

Via SFTP

To disable compilation in Magento, edit includes/config.php. At around line 28, uncomment the first line and comment out the second: