Skip to content

Instantly share code, notes, and snippets.

View damienwebdev's full-sized avatar
💻
Working on Daffodil @graycoreio

Damien Retzinger damienwebdev

💻
Working on Daffodil @graycoreio
View GitHub Profile
@damienwebdev
damienwebdev / 34111-v2.4.4-p3.patch
Last active April 8, 2023 18:48
Patch for Magento Missing Root Store `catalog_category_product_index` v2.4.4
diff --git a/Model/Indexer/Category/Product/AbstractAction.php b/Model/Indexer/Category/Product/AbstractAction.php
index 020c195..955be66 100644
--- a/Model/Indexer/Category/Product/AbstractAction.php
+++ b/Model/Indexer/Category/Product/AbstractAction.php
@@ -169,7 +169,7 @@ abstract class AbstractAction
*/
protected function reindex()
{
- foreach ($this->storeManager->getStores() as $store) {
+ foreach ($this->storeManager->getStores(true) as $store) {
Array.prototype.slice.call(document.querySelectorAll('*')).reduce(
(acc, el) => {
let listeners = getEventListeners(el);
if(Object.keys(listeners).length) {
acc[el.nodeName + el.className] = (acc[el.nodeName + el.className] ?? 0) + Object.keys(listeners).length
};
return acc;
},
{}
);
@damienwebdev
damienwebdev / memoryLeakFinder.js
Created July 24, 2022 17:54
Showcases memory leaks on page changes.
const PAGE_1 = document.querySelector('YOUR_SELECTOR');
const PAGE_2 = document.querySelector('YOUR_OTHER_SELECTOR');
let count = 0;
const memleakInterval = setInterval(() => {
count % 2 === 0 ? PAGE_1.click() : PAGE_2.click();
count++;
console.log(count);
}, 1000);

helm ls -a

NAME                    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                           APP VERSION
nfs-media-server        default         1               2020-07-08 15:21:46.0611715 -0400 EDT   deployed        nfs-server-provisioner-1.1.1    2.3.0 

helm history nfs-media-server

REVISION        UPDATED                         STATUS          CHART                           APP VERSION     DESCRIPTION     
1               Wed Jul  8 15:21:46 2020        deployed        nfs-server-provisioner-1.1.1    2.3.0           Install complete
@damienwebdev
damienwebdev / Mage_Widget_Helper_Data.php
Created December 14, 2017 19:14
Magento Widget XML/HTML Entities 500 Error Fix
<?php
class Mage_Widget_Helper_Data extends Mage_Core_Helper_Abstract
{
/**
* Further refine escaped HTML.
*/
public function escapeHtml($data, $allowedTags = null)
{
$parent = parent::escapeHtml($data, $allowedTags);
@damienwebdev
damienwebdev / Mage_Core_Model_Layout_Update.php
Last active December 14, 2017 15:18
Broken Widget function
<?php
class Mage_Core_Model_Layout_Update {
public function fetchDbLayoutUpdates($handle)
{
$_profilerKey = 'layout/db_update: '.$handle;
Varien_Profiler::start($_profilerKey);
$updateStr = $this->_getUpdateString($handle);
if (!$updateStr) {
return false;
}
<?php
use MyModel;
class ExampleClass {
public static function sumMyData(){
$sum = 0;
$myIdsArray = [];
$myIdsArray = MyModel::getMyListOfIdsFromDb();
$collection = MyModel::getCollection($myIdsArray);
foreach($object in $collection){
$sum = sum + $object->value;
public interface A{
public boolean method(Base B);
}
public class Parent{
}
public class Child extends Parent{
var a = [{
id: 1
}, {
id: 2
}];
var b = [{
id: 1
}, {
id: 2
gulp.task("webpack-dev-server", function() {
// modify some webpack config options
var myConfig = Object.create(webpackConfig);
// Start a webpack-dev-server
new WebpackDevServer(webpack(myConfig),{
contentBase: 'build',
inline:true
})
.listen(8080, "localhost", function(err) {