Skip to content

Instantly share code, notes, and snippets.

Avatar
🤝
Ready for new Magento 1&2 Freelance Projects

Osiozekhai Aliu aliuosio

🤝
Ready for new Magento 1&2 Freelance Projects
View GitHub Profile
@aliuosio
aliuosio / Memory.php
Created Jun 1, 2020
Alpine Overide Memory.php
View Memory.php
<?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
aliuosio / install-config-mysql.php
Last active May 28, 2020
Magento 2 Integration Test DB Connect
View install-config-mysql.php
<?php
return [
'db-host' => '172.21.0.1',
'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
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="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
colors="true"
bootstrap="./framework/bootstrap.php"
>
<testsuites>
<testsuite name="Memory Usage Tests">
<directory>../../../app/code/*/*/Test/Integration</directory>
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
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 https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
@aliuosio
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
aliuosio / README.md
Created May 30, 2018
MysqlDump UTF-8
View README.md

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

@aliuosio
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 user.name "Your Name"
// Set User Email