Skip to content

Instantly share code, notes, and snippets.

View lmarquine's full-sized avatar
🎯
Focusing

Leonardo Marquine lmarquine

🎯
Focusing
  • Jaraguá do Sul / SC - Brazil
  • 02:12 (UTC -03:00)
View GitHub Profile
@lmarquine
lmarquine / customer_account.xml
Created December 5, 2022 05:48 — forked from matt-bailey/customer_account.xml
Disable My Account sidebar links in Magento 2
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- Remove unwanted account navigation links -->
Combined PR's into optimized VCL file:
1. https://github.com/magento/magento2/pull/29360
2. https://github.com/magento/magento2/pull/28944
3. https://github.com/magento/magento2/pull/28894
4. https://github.com/magento/magento2/pull/35228
5. https://github.com/magento/magento2/pull/36524
6. https://github.com/magento/magento2/pull/34323
@package magento/module-page-cache
@version 100.4.5
@lmarquine
lmarquine / CsrfValidatorSkip.php
Created April 14, 2020 17:40 — forked from ananth-iyer/CsrfValidatorSkip.php
Magento 2.3.0: Implement below code to skip the CSRF check on your custom route called outside Magento environment. This implementation does not break core frontend/adminhtml routes, Magento 2.3/2.2/2.1 web stores.
<?php
namespace Module\Vendor\Plugin;
class CsrfValidatorSkip
{
/**
* @param \Magento\Framework\App\Request\CsrfValidator $subject
* @param \Closure $proceed
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Framework\App\ActionInterface $action
#Put on your .bashrc or .bash_profile
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOR="\[\033[0m\]"
@lmarquine
lmarquine / cache-clear.sh
Created August 3, 2019 18:31 — forked from lucien144/cache-clear.sh
Clear Cloudflare cache from command line.
#!/bin/bash
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/{$ZONE_ID}/purge_cache" \
-H "X-Auth-Email: {$EMAIL}" \
-H "X-Auth-Key: {$API_KEY}" \
-H "Content-Type: application/json" \
--data '{"purge_everything":true}'
@lmarquine
lmarquine / .gitignore
Created May 11, 2019 16:37 — forked from yireo/.gitignore
Magento 2 gitignore file
# Metadata
/.buildpath
/.cache
/.metadata
/.project
/.settings
atlassian*
/nbproject
/sitemap
/.idea
@lmarquine
lmarquine / git.md
Created March 28, 2019 20:14 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@lmarquine
lmarquine / .gitignore
Created November 25, 2018 02:24
Magento 1 - Git Ignore Example
# @author MagedIn Developers Team <developers@magedin.com>
#--------------------------#
# Global Files Types #
#--------------------------#
.svn*
*.bkp
*.old
js_bkp/
js.old/
@lmarquine
lmarquine / db_backup.sh
Created November 24, 2018 18:23 — forked from NARKOZ/db_backup.sh
MySQL backup shell script
#!/bin/bash
# Shell script to backup MySQL database
# Set these variables
MyUSER="" # DB_USERNAME
MyPASS="" # DB_PASSWORD
MyHOST="" # DB_HOSTNAME
# Backup Dest directory
DEST="" # /home/username/backups/DB
@lmarquine
lmarquine / magento-design-exception.txt
Created September 12, 2018 19:42 — forked from r-martins/magento-design-exception.txt
Magento Design Exception - Para Mobile
iP(hone|od)|(a|A)ndroid.*(m|M)(obile|ini)|(a|A)ndroid 3|BlackBerry|IEMobile|Windows Mobile|Windows Phone|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune|Googlebot-Mobile