Skip to content

Instantly share code, notes, and snippets.

View pauloharaujos's full-sized avatar

Paulo Henrique Silva pauloharaujos

View GitHub Profile
@pauloharaujos
pauloharaujos / gist:734d40a9261bb6881e2dfd808f5077b0
Last active June 16, 2020 20:47
Undefined Index RendererFactory.php
get the env.json file from the staging or production and use it !
Entra nesse arquivo
3:33
vendor/magento/framework/Serialize/Serializer/Serialize.php
3:33
e comenta a linha 33
@pauloharaujos
pauloharaujos / gist:9f449c85574cab646f69e76e9f329242
Created May 18, 2020 14:41
M2 - Convert old Setup Scripts to Declarative Schema
Remove your module from setup_module table
Remove your module tables from the database
Run bin/magento setup:install --convert-old-scripts=1 && bin/magento setup:upgrade --convert-old-scripts=1
Go to core_config_data
Find the patch web/secure/use_in_adminhtml
change the value to 0
@pauloharaujos
pauloharaujos / gist:dc46a53265fb694b3fa019493d4967cf
Last active August 31, 2021 16:39
Fix No Administrators role was found, data fixture needs to be run
a tabela é authorization_role
vai nessa tabela
e na linha que tiver o "role_id" = 1
muda o "role_name" para "Administrators"
se a tabela estiver vazia, rodar a query abaixo:
@pauloharaujos
pauloharaujos / Valet DNS_PROBE_FINISHED_NXDOMAIN
Created March 26, 2020 17:28
Valet DNS_PROBE_FINISHED_NXDOMAIN
Run brew reinstall dnsmasq && sudo rm -rf /usr/local/Cellar/dnsmasq/2.80.reinstall
@pauloharaujos
pauloharaujos / gist:bb6173d8f9e64d1b572fe24e55ec109f
Created February 7, 2020 15:42
Solve "Type Error occurred when creating object: Magento\Framework\Locale\Resolver"
Solve "Type Error occurred when creating object: Magento\Framework\Locale\Resolver"
Just delete crypt key in env.php
@pauloharaujos
pauloharaujos / gist:a5922e75580753a8331b54d2032d6c9f
Last active February 6, 2020 19:43
Bird Brooklyn - Set up local environment
Disable this modules :
Teamwork modules
Lesti_Fpc.xml
Guidance_Cachebuster.xml
Webshopapps_Premiumrate.xml
Webshopapps_Wsacommon.xml
Webshopapps_Wsalogger.xml
Disable Braintree Paypal Extension in Magento admin panel or set up sandbox credentials
@pauloharaujos
pauloharaujos / gist:ee27befe37efa0a65959d3917378bf4f
Created January 21, 2020 14:06
How to backup you MYSQL databases if mysql is broken
Copy the paste /usr/local/var/mysql/
1 -Try this :
valet stop mysql
mv /usr/local/var/mysql/ib_log* /Users/paulo/Downloads
valet start mysql
2 - IF the step 1 not worked, try reinstall the MYSQL

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil. To add this option, just run the code below in your console:

var brazil = document.createElement('option');
brazil.value = '+55';
brazil.appendChild(document.createTextNode('Brazil +55'));
document.querySelectorAll('#countrycode').forEach((select) => select.appendChild(brazil));