Skip to content

Instantly share code, notes, and snippets.

View ottonet's full-sized avatar

Jean-Paul Otto ottonet

View GitHub Profile
@farmio
farmio / knx-relative-dimming-for-lights.yaml
Last active April 3, 2024 18:51
KNX - relative dimming for lights blueprint
blueprint:
name: KNX - relative dimming for lights
description: Controll Home Assistant Light entities from KNX switching and relative dimming (DPT 3.007) telegrams.
domain: automation
input:
target_lights:
name: Light
description: The lights that shall be controled.
selector:
target:
@peterjaap
peterjaap / server.blacklist
Last active January 1, 2024 13:39
Bad bot blacklist nginx config file (used on Hypernodes for Magento - place in /data/web/nginx/server.blacklist)
# Main list
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|DISCo|discobot|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearch|ExpertSearchSpider|Express\ WebPictures|extract|ExtractorPro|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|genieo|Genieo|GetRight|GetWeb\!|GigablastOpenSource|Go\-Ahead\-Got\-It|Go\!Zilla|GozaikBot|grab|GrabNet|Grafula|GrapeshotCrawler|GT\:\:
@sandermangel
sandermangel / price.phtml without Weee
Last active November 13, 2018 15:13
The price.phtml template without all the Weee stuff
<?php
/**
* Updated price.phtml without WEEE
*
* NOTICE OF LICENSE
*
* This source file is subject to the MIT License
* It is available through the world-wide-web at this URL:
* http://opensource.org/licenses/mit-license.php
*
@schmengler
schmengler / SSE_FormFiller Bookmarklets.md
Last active June 27, 2019 11:47
Bookmarklets: Fill Magento forms with data powered by Faker.js

These bookmarklets allow you to use the scripts of SSE_FormFiller in any Magento installation without having to install the extension.

  1. Load FormFiller:

     javascript:(function%20(){document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).src='https://cdnjs.cloudflare.com/ajax/libs/Faker/0.7.2/MinFaker.js';document.getElementsByTagName('head')[0].appendChild(document.createElement('script')).src='https://rawgit.com/schmengler/FormFiller/master/js/sse/formfiller.js';}());
    
  2. Fill billing form:

     javascript:formFiller.fill(billingForm.form)
    
@tegansnyder
tegansnyder / hhvm_magento_setup.md
Last active July 14, 2023 22:30
HHVM Magento Server Setup

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
@tegansnyder
tegansnyder / opcache.ini
Last active September 2, 2022 16:24
OpCache settings for Magento on PHP 5.5.14. Store this file as /etc/php.d/opcache.ini
; Enable Zend OPcache extension module
zend_extension=opcache.so
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=0
; The OPcache shared memory storage size.
@hans2103
hans2103 / bundle-price.phtml M1.9
Last active October 23, 2018 17:46
Implementation of structured data itemprop=price on app/design/frontend/<your_package>/<your_theme>/template/bundle/catalog/product/price.phtml - Magento 1.9.0.x - http://schema.org/Offer - more information: http://www.byte.nl/blog/magento-rich-snippets-made-easy/
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@hans2103
hans2103 / price.phtml M1.9
Last active October 23, 2018 17:47
Implementation of structured data itemprop=price on app/design/frontend/<your_package>/<your_theme>/template/catalog/product/price.phtml - Magento 1.9.0.x - http://schema.org/Offer - more information: http://www.byte.nl/blog/magento-rich-snippets-made-easy/
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@boogah
boogah / nginx.conf
Created April 8, 2014 16:26
Semalt nginx block
if ($http_referer ~* "semalt\.com") {
return 444;
}
@tegansnyder
tegansnyder / magento-permissions.sh
Created February 14, 2014 03:21
Magento permissions
find . -type f \-exec chmod 644 {} \;
find . -type d \-exec chmod 755 {} \;
find ./var -type d \-exec chmod 777 {} \;
find ./var -type f \-exec chmod 666 {} \;
find ./media -type d \-exec chmod 777 {} \;
find ./media -type f \-exec chmod 666 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml