Skip to content

Instantly share code, notes, and snippets.

@cosmomill
cosmomill / 10_IT.pm.patch
Created February 22, 2017 21:47
Switch back to native RF mode if needed. Patch created against rev 13196.
--- 10_IT.pm.orig 2017-02-22 11:53:15.520475979 +0100
+++ 10_IT.pm 2017-02-22 21:43:23.000000000 +0100
@@ -608,6 +608,16 @@
my $ret = CallFn($io->{NAME}, "AttrFn", "set", ($io->{NAME}, "rfmode", "HomeMatic"));
}
}
+
+ ## Do we need to enable native RFMode for e.g. LaCrosse??
+ my $rfmode = CallFn($io->{NAME}, "GetFn", $io, (" ", "raw", "N"));
+ if($rfmode =~ m/raw => 01/) {
@cosmomill
cosmomill / 00_CUL.pm.patch
Last active February 22, 2017 21:42
Add LaCrosse support to FHEM CUL module. Patch created against rev 12983. https://forum.fhem.de/index.php/topic,36565.0.html
--- 00_CUL.pm.orig 2017-02-21 00:12:13.804553138 +0100
+++ 00_CUL.pm 2017-02-21 18:57:39.000000000 +0100
@@ -51,7 +51,7 @@
my $clientsSlowRF = ":FS20:FHT.*:KS300:USF1000:BS:HMS: ".
":CUL_EM:CUL_WS:CUL_FHTTK:CUL_HOERMANN: ".
":ESA2000:CUL_IR:CUL_TX:Revolt:IT:UNIRoll:SOMFY: ".
- ":$sccMods:CUL_RFR::CUL_TCM97001:CUL_REDIRECT:";
+ ":$sccMods:CUL_RFR::CUL_TCM97001:CUL_REDIRECT:LaCrosse:";
my $clientsHomeMatic = ":CUL_HM:HMS:CUL_IR:$sccMods:";
my $clientsMAX = ":CUL_MAX:HMS:CUL_IR:$sccMods:";
@cosmomill
cosmomill / sArticles.php.patch
Created July 17, 2014 17:46
Shopware 4.2.3 - Fix incorrect tax calculation if tax rules are used.
--- sArticles.php.orig 2014-07-17 19:30:46.000000000 +0200
+++ sArticles.php 2014-07-17 19:35:31.000000000 +0200
@@ -3345,6 +3345,9 @@
$getArticle["sDescriptionKeywords"] = htmlspecialchars(implode(", ", array_slice(array_keys($words), 0, 20)), ENT_QUOTES, 'UTF-8', false);
}
+ // Support tax rate defined by certain conditions
+ $getTaxByConditions = $this->getTaxRateByConditions($getArticle["taxID"]);
+ if ($getTaxByConditions === false) $getArticle["tax"] = (float) $getArticle["tax"]; else $getArticle["tax"] = (float) $getTaxByConditions;
@cosmomill
cosmomill / mailman-subject.patch
Last active December 17, 2015 18:09
Customize subject for Mailman 2.1.18. This patch adds the ability to customize the subject line for the subscribe confirmation message (subscribeack), unsubscribe confirmation message (unsuback), invitation message (invite) and unsubscribe message. Put the template files subscribeack-subj.txt, unsuback-subj.txt, invite-subj.txt or unsub-subj.txt…
diff -Nur Mailman.orig//Deliverer.py Mailman//Deliverer.py
--- Mailman.orig//Deliverer.py 2014-07-16 15:07:22.000000000 +0200
+++ Mailman//Deliverer.py 2014-07-16 14:54:24.000000000 +0200
@@ -67,24 +67,40 @@
'password' : password,
'user' : self.getMemberCPAddress(name),
}, lang=pluser, mlist=self)
+ realname = self.real_name
+ try:
+ subj = Utils.maketext(
@cosmomill
cosmomill / owncloud-anonymous-upload.patch
Last active December 17, 2015 09:59
Add anonymous upload Feature as requested in https://github.com/owncloud/core/issues/740 to ownCloud 4.5.10
diff --git apps/files_sharing/ajax/upload.php apps/files_sharing/ajax/upload.php
new file mode 100644
index 0000000..d5fc5f2
--- /dev/null
+++ apps/files_sharing/ajax/upload.php
@@ -0,0 +1,125 @@
+<?php
+
+// Init owncloud
+
@cosmomill
cosmomill / froxlor-php-fpm.patch
Created February 11, 2013 11:22
Add custom php.ini files for PHP-FPM to Froxlor 0.9.28-svn5
diff --git actions/admin/settings/136.phpfpm.php actions/admin/settings/136.phpfpm.php
index be0e925..07c73ce 100644
--- actions/admin/settings/136.phpfpm.php
+++ actions/admin/settings/136.phpfpm.php
@@ -54,20 +54,17 @@ return array(
'default' => 'froxlorlocal',
'save_method' => 'storeSettingField'
),
- /*
- * @TODO implement if phpfpm knows custom php.ini files
@cosmomill
cosmomill / froxlor-apache24.patch
Created February 11, 2013 10:30
Add Apache 2.4 + mod_proxy_fcgi support to Froxlor 0.9.28-svn5
diff --git actions/admin/settings/130.webserver.php actions/admin/settings/130.webserver.php
index db515fc..2d29828 100644
--- actions/admin/settings/130.webserver.php
+++ actions/admin/settings/130.webserver.php
@@ -29,7 +29,7 @@ return array(
'type' => 'option',
'default' => 'apache2',
'option_mode' => 'one',
- 'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
+ 'option_options' => array('apache2' => 'Apache 2', 'apache24' => 'Apache 2.4', 'lighttpd' => 'ligHTTPd', 'nginx' => 'Nginx'),
@cosmomill
cosmomill / cronopurge
Created February 1, 2013 18:48
Purge cronolog logfiles. ErrorLog "|/usr/bin/cronolog -r /usr/bin/cronopurge -G '1week:/var/log/apache2/error.log.%s' -p 12hour -l /var/log/apache2/error.log /var/log/apache2/error.log.%s"
#!/usr/bin/perl
#
# Author: Nicolas Mendoza <nicolasm@opera.com> 2011
use strict;
use warnings;
use Data::Dumper;
use File::Basename;
use File::stat;
use File::Spec;
diff -ur httpd-2.4.2/modules/proxy/mod_proxy.h httpd-2.4.2_uds/modules/proxy/mod_proxy.h
--- httpd-2.4.2/modules/proxy/mod_proxy.h 2012-03-31 08:40:36.000000000 -0700
+++ httpd-2.4.2_uds/modules/proxy/mod_proxy.h 2012-07-27 09:44:16.000000000 -0700
@@ -231,6 +231,7 @@
* that is used over the backend connection. */
proxy_worker *worker; /* Connection pool this connection belongs to */
apr_pool_t *pool; /* Subpool for hostname and addr data */
+ const char *uds_path; /* Unix domain socket path */
const char *hostname;
apr_sockaddr_t *addr; /* Preparsed remote address info */
@cosmomill
cosmomill / dovecot-sql.conf
Last active February 8, 2023 20:13
Dead Simple Postfix/Dovecot Config for Froxlor
driver = mysql
connect = host=127.0.0.1 dbname=froxlor user=froxlor password=secret
default_pass_scheme = CRYPT
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('mdbox:', homedir, maildir) AS userdb_mail, CONCAT('*:storage=', (quota*1024)) as userdb_quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('mdbox:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
# The iterate_query is required for the doveadm command and works only on dovecot 2 servers.
iterate_query = SELECT username AS user FROM mail_users