Skip to content

Instantly share code, notes, and snippets.

View Marko-M's full-sized avatar

Marko Martinović Marko-M

View GitHub Profile
@Marko-M
Marko-M / magento2-performance-toolkit.sh
Last active March 28, 2023 17:27
Magento2 performance toolkit
#!/bin/bash
# Generate sample data and trigger Magento2 performance toolkit jMeter test plan.
HOST="magento2.loc"
BASE_PATH="/"
USERS=100
RAMP_PERIOD=300
LOOPS=1
ADMIN_USER="magento2"
ADMIN_PASSWORD="magento2"
From 063359089809f7da4a4f6a95b4523135e6c4711f Mon Sep 17 00:00:00 2001
From: Luke Rodgers <lr@amp.co>
Date: Thu, 9 Jun 2022 11:58:46 +0100
Subject: [PATCH 1/4] Fix Test Logger monolog compatability
# System info
- Magento 2.4.4
- PHP 8.1
# To reproduce
--- App/DeploymentConfig.php 2022-03-08 00:52:02.000000000 +0000
+++ App/DeploymentConfig.php 2022-06-20 19:45:21.192956000 +0000
@@ -35,14 +35,14 @@
*
* @var array
*/
- private $data;
+ private $data = [];
/**
@Marko-M
Marko-M / gist:5cdfecd4229a0c22178e8103089fc4d7
Created February 14, 2022 14:07
MySQL production environment
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1898052
Server version: 10.2.31-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
@Marko-M
Marko-M / gist:fb49dfacdc4c15cf84e3b76fcff3433b
Created February 14, 2022 14:05
MySQL local development environment
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 209
Server version: 5.7.33-36 Percona Server (GPL), Release 36, Revision 7e403c5
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
From 597b769f5918e11b58dc15ae7cc407477ee2c695 Mon Sep 17 00:00:00 2001
From: Sergey Nezbritskiy <sergey.nezbritskiy@gmail.com>
Date: Sun, 15 Aug 2021 17:55:34 +0300
Subject: [PATCH 1/7] ISSUE-33802: ensure that deployment config will reload
its data, if the key was not found
---
.../Framework/App/DeploymentConfig.php | 33 +++++++---
.../App/Test/Unit/DeploymentConfigTest.php | 64 +++++++++++--------
2 files changed, 60 insertions(+), 37 deletions(-)
@Marko-M
Marko-M / magento2-1.0.0-beta-fixed-benchmark.jmx
Last active June 9, 2021 18:09
Magento 2 Merchant Beta fixed performance toolkit benchmark.jmx
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Toolkit" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="host" elementType="Argument">
/**
* DevGenii #8: Dummy Postpay JavaScript
*/
define(function () {
window.Postpay = {
renderElement: function (el) {
el.innerHTML = 'Postpay!'
},
hideElement: function (el) {
el.style.display = 'none';
@Marko-M
Marko-M / resave.php
Last active October 25, 2019 12:29
Script to re-save Magento store products per store/product type
<?php
require_once 'abstract.php';
class Mmartinovic_Shell_Resave extends Mage_Shell_Abstract
{
protected $_stores = [];
protected $_types = [];
public function __construct() {
parent::__construct();
@Marko-M
Marko-M / gist:9588211
Last active September 12, 2018 10:06
Xdebug trace with ?XDEBUG_TRACE trigger
zend_extension=/usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.auto_trace=0
xdebug.trace_enable_trigger=1
xdebug.trace_format=0
xdebug.trace_output_name=trace.%R
xdebug.collect_params=1