Skip to content

Instantly share code, notes, and snippets.

View DanielSousa's full-sized avatar

Daniel Sousa DanielSousa

View GitHub Profile
@erikhansen
erikhansen / README.md
Last active August 15, 2023 09:21
Running Warden on Windows with WSL 1 & 2

Running Warden on Windows with WSL 2

See this Github comment thread for any issues or additional context for getting Warden running on Windows with WSL 2.

The instructions below cover how to install Warden on Windows, using WSL 2.

  1. Install Ubuntu 20 LTS in WSL 2
    1. To access the shell/terminal inside of Ubuntu WSL, open the Ubuntu 20.04 program that will have been installed in the step above (If you want to be able to copy/paste, see here. Going forward, this article assumes you will run all commands inside of the Ubuntu terminal
  2. Install Docker Desktop (these instructions were tested using Docker 4.9.0 on June 13th, 2022)
  3. Install homebrew `
@peterjaap
peterjaap / DB_CLEANUP_WITH_QUOTE_TABLE.php
Last active April 13, 2020 20:46
Updated Magento 2 cleanup script for sensitive data in wishlist_item_option, quote_item_option AND order_item_option (not in original script). Also added try/catch block for unserializable data. See for more info https://support.magento.com/hc/en-us/articles/360040209352 and https://magento.com/security/hot-fix-available-cve-2019-8118
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
use Magento\Framework\App\Bootstrap;
use Magento\Framework\DB\Adapter\AdapterInterface;
use Magento\Framework\DB\Query\Generator;
use Magento\Framework\DB\Select\QueryModifierFactory;
@molotovbliss
molotovbliss / README.md
Last active August 22, 2025 11:51
Speed up warden for faster importing of large sql dumps.

Speed up warden for faster importing of large sql dumps.

  1. Add the innodb options to the warden/environments/magento2.base.yml docker-compose YML file.
  2. Restart warden environment warden env down && warden sync stop && warden env up -d && warden sync start
  3. Import the .sql file with warden db import.
  4. Remove options & restart warden enviornment once import completed.

Why these settings

  • innodb_buffer_pool_size : Will cache frequently read data
Magento Minor Version PHP 5.5 PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4
2.0
2.1 ✓[1] 2.1.16+
2.2 ✓[2] 2.2.10+
2.3 ✓[3] 2.3.3+
2.4 ✓[3]

Notes:

  1. Only 7.0.2 and ~7.0.6 for 2.1.0-2.1.1. Starting with 2.1.2 that was expanded to include 7.0.4.
@pinkeen
pinkeen / .0-MAGENTO-CLOUD-HELPER-SCRIPTS.md
Last active July 16, 2021 13:13
Helper scripts for Magento Commerce Cloud prod/stage envs

Magento Cloud helper scripts

I drop them into the root project's dir and push them to the repo. Mostly they should use whatever env you've got checked out with magento-cloud command.

Tested only on Mac with Pro/Stage envs, use at your own risk YMMV.

Tip: You can adjust .gitignore like this for convenience:

Top modules for Magento 2

I update this page to have the top Magento 2 modules for performance, development, ux and more.

Performance

Check the store performance tips in an admin panel dashboard

https://github.com/magehost/performance-dashboard

@rafaelstz
rafaelstz / 1step-Install-Deployer-Magento2-BitbucketPipelines.md
Last active June 24, 2025 23:28
Automated deploy using Magento 2 + Bitbucket Pipelines + Deployer

Use both files in your root folder and run:

curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep
composer require deployer/recipes --dev
composer require rafaelstz/deployer-magento2 dev-master --dev
@fcamblor
fcamblor / README.md
Last active August 17, 2022 07:59
debug-requirejs-loading.js

Simply include debug-requirejs-loading.js script before starting your requirejs dependencies :

<script src="scripts/require.js"></script>
<script src="path/to/debug-requirejs-loading.js"></script>
<script type="text/javascript">
require(['data/main'], function(){ console.log("requirejs started !"); });
</script>

It will show :

@dkorn
dkorn / compile_nginx_from_sources.yml
Created October 11, 2017 08:57
Ansible Playbook compiling NGINX from sources, to include particular modules
---
- name: Compile NGINX from sources
hosts: webserver
vars:
nginx_version: nginx-1.13.4
nginx_tarball_url: "http://nginx.org/download/{{ nginx_version }}.tar.gz"
nginx_install_dir: "/tmp/{{ nginx_version }}"
nginx_sbin_path: "/usr/sbin/nginx"
nginx_conf_path: "/etc/nginx/nginx.conf"