Skip to content

Instantly share code, notes, and snippets.

Ready for new Magento 1&2 Freelance Projects

Osiozekhai Aliu aliuosio

Ready for new Magento 1&2 Freelance Projects
View GitHub Profile
aliuosio / Memory.php
Created Jun 1, 2020
Alpine Overide Memory.php
View Memory.php
* Helper for determining system memory usage
* Uses OS tools to provide accurate information about factual memory consumption.
* The PHP standard functions may return incorrect information because the process itself may have leaks.
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
aliuosio / install-config-mysql.php
Last active May 28, 2020
Magento 2 Integration Test DB Connect
View install-config-mysql.php
return [
'db-host' => '',
'db-user' => 'root',
'db-password' => 'root',
'db-name' => 'magento_integration_tests',
'db-prefix' => '',
'backend-frontname' => 'backend',
'admin-user' => \Magento\TestFramework\Bootstrap::ADMIN_NAME,
'admin-password' => \Magento\TestFramework\Bootstrap::ADMIN_PASSWORD,
aliuosio / phpunit.xml
Last active May 28, 2020
Magento 2 Integration Test Config
View phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi=""
<testsuite name="Memory Usage Tests">
View ffmpeg convert mkv to mp3
find . -type f -name "*.mkv" -exec sh -c 'FILE="$1"; ffmpeg -i "${FILE}" -vn -c:a libmp3lame -y "${FILE%.mkv}.mp3";' _ '{}' \;
aliuosio / docker-with-volume
Last active Aug 17, 2019
jump into alpine container with volume mount
View docker-with-volume
docker run -it --name <name> -v $(pwd):/home alpine sh
View magento-cache-clean
composer require --dev mage2tv/magento-cache-clean
Cache Watch
vendor/bin/cache-clean.js --watch
Cache Clean Single
vendor/bin/cache-clean.js config full_page
Cache Help
vendor/bin/cache-clean.js --help
View docker-debian.txt
curl -s | sudo bash
sudo apt-get install git-lfs
git lfs install
aliuosio / MySQL Query Logging
Last active Jul 12, 2018
MySQL Query Logging
View MySQL Query Logging
# log MySQl Queries
# in file /etc/mysql/my.cnf
general_log = 1
log_output = table
-- Get Insert Statements
SELECT argument FROM general_log WHERE command_type = 'Query' AND argument LIKE '%UPDATE%' OR argument LIKE '%INSERT%';
aliuosio /
Created May 30, 2018
MysqlDump UTF-8

mysqldump -u bw_magento -p --default-character-set=utf8 bw_magento > bw_magento-local-28.05.2018.sql

aliuosio / Useful Git Commnds
Last active Mar 9, 2018
Useful Git Commnds
View Useful Git Commnds
// Save Git Password for one year
git config --global credential.helper 'cache --timeout=31536000';
// Ignore chmod
git config core.fileMode false;
// Set Username Global
git config --global "Your Name"
// Set User Email