Skip to content

Instantly share code, notes, and snippets.

View oliverde8's full-sized avatar

De Cramer Oliver oliverde8

View GitHub Profile
@oliverde8
oliverde8 / stat-from-git-diff.php
Last active September 29, 2022 15:02
Quick stats from a git diff file
<?php
// STEP 1: Generate Diff:
// - git diff <old-hash> <newer-hash> > my.diff
// STEP 2: Change the path to the file here:
$filePath = "my.diff";
// STEP 3: List extensions you would like to ignore when doing your stat.
$ignoredExtensions = ['csv', 'txt', 'jar', '.properties'];
@mehdichaouch
mehdichaouch / magento2_debug_ui_component.js
Created December 17, 2020 10:16
Magento 2 - Debug UI Component (showing spinner) #magento2 #uicomponent
// https://magento.stackexchange.com/questions/310578/how-to-debug-ui-component-only-showing-spinner
// https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_logger.html
require(['Magento_Ui/js/lib/logger/console-logger',
'Magento_Ui/js/lib/logger/levels-pool'],
function(logger, levels) {
logger.setDisplayLevel(5) // 2 = WARN 5 = ALL, see levels-pool.js
}
);
@oliverde8
oliverde8 / Magento 1 - Layout-Block Debug.php
Last active May 27, 2019 12:31
Magento 1 - Add comment blocks to html output to debug layout & blocks.
<?php
/**
* Modify
* File : app/code/core/Mage/Core/Block/Template.php
* Method: fetchView
* At the very begining.
*
*/
$startTime = microtime(true);