Skip to content

Instantly share code, notes, and snippets.

View Tomasz-Silpion's full-sized avatar
💭
I may be slow to respond.

Tomasz Gregorczyk Tomasz-Silpion

💭
I may be slow to respond.
View GitHub Profile
@peterjaap
peterjaap / lestifpc_manadev.patch
Created March 4, 2015 09:42
Fix Lesti_Fpc + Manadev SEO Layered Navigation
diff --git a/app/code/community/Lesti/Fpc/Helper/Data.php b/app/code/community/Lesti/Fpc/Helper/Data.php
index 94e9ea1..daec7e1 100644
--- a/app/code/community/Lesti/Fpc/Helper/Data.php
+++ b/app/code/community/Lesti/Fpc/Helper/Data.php
@@ -70,7 +70,13 @@ class Lesti_Fpc_Helper_Data extends Lesti_Fpc_Helper_Abstract
'port' => $request->getServer('SERVER_PORT'),
'full_action_name' => $this->getFullActionName());
$uriParams = $this->_getUriParams();
- foreach ($request->getParams() as $requestParam =>
+ $manadevParams = array();
@bjorn2404
bjorn2404 / wordpress_remote_images
Created May 21, 2015 20:51
WordPress load remote images if they don't exist on the local development server htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/wp-content/uploads/(.*)$
RewriteCond %{DOCUMENT_ROOT}/wp-content/uploads/%1 !-f
RewriteRule ^wp-content/uploads/(.*)$ http://www.remotesite.com/wp-content/uploads/$1 [R=301,L]
</IfModule>
@danielpradilla
danielpradilla / index.html
Last active August 27, 2020 11:40
HTML5 skeleton
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
</head>
<body>
<h1>Hello, world</h1>
<script src="http://code.jquery.com/jquery.js"></script>
@codenameone
codenameone / MultiListSample.java
Last active July 8, 2020 09:57
Sample for creating a simple MultiList UI in Codename One
public void showForm() {
Form hi = new Form("MultiList", new BorderLayout());
int mm = Display.getInstance().convertToPixels(3);
EncodedImage placeholder = EncodedImage.createFromImage(Image.createImage(mm * 3, mm * 4, 0), false);
Image icon1 = URLImage.createToStorage(placeholder, "icon1", "http://www.georgerrmartin.com/wp-content/uploads/2013/03/GOTMTI2.jpg");
Image icon2 = URLImage.createToStorage(placeholder, "icon2", "http://www.georgerrmartin.com/wp-content/uploads/2012/08/clashofkings.jpg");
Image icon3 = URLImage.createToStorage(placeholder, "icon3", "http://www.georgerrmartin.com/wp-content/uploads/2013/03/stormswordsMTI.jpg");
Image icon4 = URLImage.createToStorage(placeholder, "icon4", "http://www.georgerrmartin.com/wp-content/uploads/2012/08/feastforcrows.jpg");
Image icon5 = URLImage.createToStorage(placeholder, "icon5", "http://georgerrmartin.com/gallery/art/dragons05.jpg");
@thomaslorentsen
thomaslorentsen / pca.js
Last active February 24, 2020 17:13
Custom integration of post code anywhere
pca.on("load", function (type, id, control) {
control.listen("populate", function (address) {
console.log('here');
});
});
@ericthehacker
ericthehacker / local.xml
Last active January 24, 2020 00:22
Local.xml nodes to disable annoying and/or inefficient admin spam
<?xml version="1.0"?>
<config>
<!-- disable annoying adminhtml observers and modules -->
<adminhtml>
<events>
<controller_action_predispatch>
<observers>
<awall_exts>
<type>disabled</type>
</awall_exts>
@mbaersch
mbaersch / adwords-script-product-reviews.js
Last active July 9, 2019 23:11
Dynamische Anzeige von Trusted Shops Produktbewertungen
/***********************************************************************/
/****** Dynamische Anzeige von Trusted Shops Produktbewertungen *******/
/***********************************************************************/
/* v1.2 2017 Markus Baersch (@mbaersch)
gandke marketing & software - www.gandke.de */
/******************************* Setup *******************************/
//Bezeichnung des Labels für Anzeigegruppen mit zu behandelnden Keywords angeben
var lblDynParams = "ApiRating";
@evgv
evgv / mage_update_content_of_meta_robots_tag.markdown
Last active January 5, 2019 01:55
Magento. Update content of meta robots tag

Update content of meta robots tag

Declare observer into config.xml

    
    <frontend>
        <events>
            <controller_action_layout_generate_xml_before>
                <observers>
@herveguetin
herveguetin / next_business_day.php
Last active August 26, 2017 18:22
Retrieve the next business or calendar day in Magento with an optional leadtime. Magento weekend days config is taken into account.
<?php
/**
* Retrieve the next business day with an optional leadtime.
* If leadtime = 1 => find the next business day
* If leadtime = 2 => find the "next next" business day
* etc...
*
* @param int $leadtime
* @return string|bool
*/