Skip to content

Instantly share code, notes, and snippets.

View albertobraschi's full-sized avatar

Alberto Braschi albertobraschi

View GitHub Profile
@albertobraschi
albertobraschi / GrumPHP-Magento2.md
Created May 22, 2023 20:03 — forked from rafaelstz/GrumPHP-Magento2.md
Configure GrumPHP in your Magento 2 to check: Composer, PHPCS, PHPMD, PHPCSFixer, PHPCPD, PHPLint, Security Checker, XML Lint.

Install GrumPHP in your Magento 2

Create the grumphp.yml in the root folder of your project and run these commands below:

    composer require "phpro/grumphp:^0.14" --dev
    composer require nlubisch/grumphp-easycodingstandard --dev
    composer require wearejust/grumphp-extra-tasks --dev
    composer require jakub-onderka/php-parallel-lint --dev   
@albertobraschi
albertobraschi / rfb-wine.md
Created September 10, 2021 16:47 — forked from tavinus/rfb-wine.md
Programas RFB (Receita Federal do Brasil) no Wine

Programas RFB no Wine

Este guia tem como objetivo guardar informações de como rodar os programas da receita federal no Wine.
Visa oferecer uma forma de rodar os programas proprietários do Windows no Linux.

Não use este guia para os programas da RFB baseado em Java!
Os programas da RFB baseados em Java devem rodar na VM Java do Linux nativamente.
Rodar Java no Wine não é recomendado!

Testado com Wine 3.0 no Linux Mint 18.3 64bit

Abreviações

#Path to shops' active theme (multiple locations allowed, separated by a ' ' (SPACE))
THEME_FOLDER=('pub/static/frontend/Magento/luma/')
#Find deployed themes (languages) and copy the themes. 'us_US' becomes 'us_US_source'. We skip directories already having a '_source' suffix
find ${THEME_FOLDER[@]} -mindepth 1 -maxdepth 1 \( -not -name '*_source' \) -type d -execdir mv -f \{} \{}_source \;
#Find all *_source themes and use them as input for r.js. The output directories are the input directory with '_source' stripped again.
find ${THEME_FOLDER[@]} -mindepth 1 -maxdepth 1 \( -name '*_source' \) -type d -exec bash -c 'r.js -o requirejs-bundle-config.js baseUrl=\{} dir="${@%"_source"}"' bash {} \;
#Find the themes that don't have _source as suffix, assuming these are the ones that are now bundled.

Magento testing scenarios

For use after an upgrade to verify the correct working of Magento

SHIP IT

Frontend

General

  • Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
  • Check meta tags in HTML
@albertobraschi
albertobraschi / README.md
Created April 17, 2019 12:07 — forked from leek/_Magento2_DeleteTestData.md
Magento 2 - Delete All Test Data

These set of scripts are for Magento 2. For Magento 1, see this Gist.

@albertobraschi
albertobraschi / debugging-tips-tricks-magento-1x.md
Created March 8, 2019 13:30 — forked from molotovbliss/debugging-tips-tricks-magento-1x.md
Debugging tips & tricks with Magento 1.x Commerce
@albertobraschi
albertobraschi / debugging-tips-tricks-magento-1x.md
Created March 8, 2019 13:30 — forked from molotovbliss/debugging-tips-tricks-magento-1x.md
Debugging tips & tricks with Magento 1.x Commerce
#!/bin/bash
PROGNAME=${0##*/}
INPUT=''
QUIET='0'
NOSTATS='0'
max_input_size=0
max_output_size=0
usage()
@albertobraschi
albertobraschi / Mb-M2-resources.md
Created September 9, 2018 01:49 — forked from molotovbliss/Mb-M2-resources.md
Magento2 Resources List; Needing a place to keep a list of all the tools/references used during Magento development.
@albertobraschi
albertobraschi / .bashrc
Last active September 9, 2018 01:47 — forked from c0reysc0tt/.bashrc
LINUX COMMAND CHEATSHEET BASH TOOLS
####################
# CLI cheatsheet #
####################
# cheatsheet directory location:
CHEATDIR=~/.cheatsheet
# Use 'vicheat' to edit the cheatsheet
alias vicheat='vim $CHEATDIR/command_cheatsheet'