Skip to content

Instantly share code, notes, and snippets.

View LucasCalazans's full-sized avatar
:octocat:
jQuery > JS

Lucas Calazans LucasCalazans

:octocat:
jQuery > JS
View GitHub Profile
@LucasCalazans
LucasCalazans / default.xml
Created January 27, 2021 19:51
Magento 2 - Remove compare products
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="catalog.compare.sidebar" remove="true" />
<referenceBlock name="related.product.addto.compare" remove="true" />
<referenceBlock name="upsell.product.addto.compare" remove="true" />
<referenceBlock name="category.product.addto.compare" remove="true" />
<referenceBlock name="related.product.addto.compare" remove="true" />
<referenceBlock name="upsell.product.addto.compare" remove="true" />
<referenceBlock name="crosssell.product.addto.compare" remove="true" />
@LucasCalazans
LucasCalazans / docker-installation.md
Created September 19, 2020 20:59
Fedora 32 - Docker configuration
@LucasCalazans
LucasCalazans / fix.md
Created April 17, 2020 13:44
Fedora - Fix screen share Google Meet

To fix the error when trying to share the whole screen in the Google Meet/Hangouts you need to edit this file

sudo vi /etc/gdm/custom.conf

un-commenting this line WaylandEnable=false

@LucasCalazans
LucasCalazans / main.js
Created October 21, 2019 13:36
Create HTML components with JS
define([
'mage/template',
'text!Magento_Theme/templates/product-card-template.html'
], function(
mageTemplate,
productCardTemplate
) {
const productElement = document.getElementById('product-container');
productElement && (productElement.innerHTML = mageTemplate(productCardTemplate, {
@LucasCalazans
LucasCalazans / README.md
Last active March 17, 2022 21:37
Use graphql with Magento 2
@LucasCalazans
LucasCalazans / routes.yaml
Last active March 31, 2022 16:15
Magento Cloud - Redirect customer pages to home
# The routes of the project.
#
# Each route describes how an incoming URL is going to be processed.
"http://{all}/":
type: upstream
upstream: "mymagento:http"
redirects:
paths:
"^/customer/account/forgotpassword/.*": { to: "http://{all}/", regexp: true }
@LucasCalazans
LucasCalazans / create-magento-project.sh
Last active August 2, 2019 16:32
Create a Magento 2 Project based on Magento Cloud repository
#!/usr/bin/env bash
#####################################################
# #
# SYSTEM VALIDATION #
# #
#####################################################
#####################################################
@LucasCalazans
LucasCalazans / exec.sh
Last active July 19, 2019 16:26
Execute a PHP command with a docker container
#!/bin/bash
PID=$(id -u $USER);
GID=$(id -g $USER);
mkdir -p ~/.composer/cache;
docker run --rm \
-v $(pwd):/app \
-v ~/.composer/cache:/var/www/.composer/cache \
@LucasCalazans
LucasCalazans / .bashrc
Created June 17, 2019 16:31
Add git branch to terminal line
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1='[\u@\h \W]$(parse_git_branch)\$ '
@LucasCalazans
LucasCalazans / ws-config.js
Created June 17, 2019 14:39
Add alias to WebStorm/PHPStorm
System.config({
"paths": {
"@/*": "./src/*"
}
});