Skip to content

Instantly share code, notes, and snippets.

View simbus82's full-sized avatar
I'm making some good Web Marketing Projects

Simone Bussoni simbus82

I'm making some good Web Marketing Projects
View GitHub Profile
@thorstenfriesen
thorstenfriesen / gist:5574702
Created May 14, 2013 09:14
Workaround to unbind the event listeners for the agreement checkboxes
$$('.checkout-agreements p.agree').each(function(item){
var agreementsBlock = $(item);
if(agreementsBlock != undefined) {
agreementsBlock.replace('<p class="agree">' + agreementsBlock.innerHTML + '</p>');
}
});
@rickbenetti
rickbenetti / head.phtml
Last active September 7, 2023 07:41
Add header rich snippets to your Magento Store
<?php
/**
*
* Copyright (c) 2013 Studio Boz
*
* @project_name Studio Boz
* @copyright Copyright (c) 2013 Studio Boz (http://studioboz.com.br)
* @author Rick Benetti <rick@studioboz.com.br>
*
**/
@jarvys
jarvys / run-multiple-redis-instances.md
Last active September 27, 2022 13:02
run multiple redis instances on the same server for centos
  • create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
  • edit /etc/redis-xxx.conf, illustrated as below
...
@simbus82
simbus82 / .htaccess
Last active April 9, 2019 12:44
.htaccess to use in Joomla root
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
@petskratt
petskratt / robots.txt
Last active March 5, 2023 16:03
Magento robots.txt
# robots.txt for Magento 1.9.x & 2.x / v1.7 2023-01-30 / peeter.marvet@vaimo.com
# - original version from 2015 for 1.9.x, but these rules are OK for M2 as well
# - edited in 2017 to add filter query parameter disallow samples + some wildcards
# - edited in 2018 to add query params blocking to Yandex as named User-agent does not read *
# - edited in 2023 to remove unneeded stuff (license.txt, crawl-delay) and make all rules use */ prefix
# based on:
# https://inchoo.net/ecommerce/ultimate-magento-robots-txt-file-examples/
# https://www.hypernode.com/nl/blog/magento-robots-txt/
# https://astrio.net/blog/optimize-robots-txt-for-magento/
#
@piotrekkaminski
piotrekkaminski / PATCH_SUPEE-4814_EE_1.14.1.0_v1.sh
Created April 17, 2015 14:36
PATCH_SUPEE-4814_EE_1.14.1.0_v1.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@pinscript
pinscript / getIP.js
Created August 25, 2015 06:49
Google Spreadsheet function to lookup IP for a hostname
function getIP(host) {
var url = "https://freegeoip.net/json/" + host;
var json = UrlFetchApp.fetch(url);
var data = JSON.parse(json);
return data["ip"];
}
diff --git a/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php b/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
index c07e179..e3ba1e6 100644
--- a/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
+++ b/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
@@ -111,6 +111,12 @@
// $aggregatorArr = explode('/', $this->getAggregator());
// $this->setValue((int)$aggregatorArr[0])->setAggregator($aggregatorArr[1]);
+ // The parent class is passing children of configurable items to this method again
+ // this is causing an infinite recursion if we let it pass
@CannonballSkippy
CannonballSkippy / test.html
Created May 17, 2017 21:33
Basic markup test content for typography
<h1>Testing display of HTML elements</h1>
<h2>This is 2nd level heading</h2>
<p>This is a test paragraph.</p>
<h3>This is 3rd level heading</h3>
<p>This is a test paragraph.</p>
<h4>This is 4th level heading</h4>
<p>This is a test paragraph.</p>
<h5>This is 5th level heading</h5>
<p>This is a test paragraph.</p>
@dvlop
dvlop / gist:fca36213ad6237891609e1e038a3bbc1
Last active April 3, 2024 20:21 — forked from allthingsdem/gist:63b3223a7d14ac1f2457
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot