Skip to content

speed up your owncloud by using redis on an uberspace webspace

Your owncloud is a bit slow, you are using uberspace and you want to speed it up easily?
Easy solution is to use redis.
The compressed howto is down below. It is taken from the uberspace wiki and a privat blog entry.


test -d ~/service || uberspace-setup-svscan
uberspace-setup-redis
svc -du ~/service/redis

#to prevent or fix the following error "Missing memcache class \OC\Memcache\Redis for local cache"
uberspace-install-pecl redis

Last but not least, you have to adapt your /config/config.php file by adding and adapting the following lines into the configuration array.


    //...
    //begin of redis configuration
    'memcache.local' => '\OC\Memcache\Redis',
    'redis' => array(
        'host'      => '/home//.redis/sock',
        'port'      => 0,
        'timeout'   => 0.0 
    )
    //end of redis configuration
    //...

Translate to de es fr it pt ja

Vorratsdatenspeicherung? - Nicht schon wieder!

Der Bundestag hat am Freitag, 16. Oktober 2015 mit den Stimmen von SPD und CDU die Wiedereinführung der Vorratsdatenspeicherung beschlossen. Diese wurde bereits 2010 durch das Bundesverfassungsgericht für verfassungswidrig erklärt. 2014 hat außerdem der Europäische Gerichtshof die EU-Richtlinie zur Vorratsdatenspeicherung als nicht vereinbar mit der EU-Grundrechte-Charta verworfen und im September 2015 hat die EU-Kommission den Entwurf wegen unverhältnismäßiger Eingriffe in Grundrechte scharf kritisiert.
[...]

Quelle
Ja, ja, die gehirntoten im Bundestag mal wieder. Der Politikvetterfilz scheint sich doch einiges an steuersubventionierte Gewinn aus der Vorratsdatenspeicherung zu versprechen, anders kann man dieses dauerhafte ignorieren der Bürgerwünsche nicht mehr erklären. Gut, eine Idee kommt noch, man hat - ganz den großen Brüder vom "über den Teichen" folgend - Angst vor der eigenen Bevölkerung.
Zum Glück haben wir Vereine wie den digitalcourage. Sie haben eine Seite erstellt, mit der du ohne viel Aufwand (geht sogar vom Klo aus) gegen die Vorratsdatenspeicherung eine Verfassungesbeschwerde einreichen kannst. Wenn du dies tust, gibt es eine kostenlose Umarmung von mir obendrauf für lau dazu - ist doch was, oder?.

Translate to de es fr it pt ja

Creating an Email with a return path (needed for bounce management) that is not overwritten by the SMTP by using the PHP Zendframework 2

This time, my task was to create an email in an zend framework 2 environment.
The complicated part was the fact, that I wanted to set the "Return-Path". I did it this way $headers->addHeader('Return-Path', ''); but it always got overwritten.
After a while and a chat with an other technical guy and some readings of some SMTP configuration files and specifications, we found the solution. You have to envelope the mail and the zend framework has a class for this. Following is a generic and general solution for this problem.


<?php
//@see: https://artodeto.bazzline.net/archives/835-Creating-an-Email-with-a-return-path-needed-for-bounce-management-that-is-not-overwritten-by-the-SMTP-by-using-the-PHP-Zendframework-2.html
//full qualified class names since I wanted to keep the code snippet
//  as short as possible

//begin of parameters
$body               = new \Zend\Mime\Message();
$bounceEmailAddress = '<unique bounce email address>';
$encoding           = 'UTF-8';
$envelope           = new \Zend\Mail\Transport\Envelope();
$fromEmailAddress   = '<from@your-doma.in>';
$fromName           = '<your name>';
$htmlContent        = '<p>html content</p>';
$message            = new \Zend\Mail\Message();
$options            = new \Zend\Mail\Transport\SmtpOptions(
    array(
        'connection_class'  => '<login>',
        'connection_config' => array(
            'password'  => '<password>',
            'username'  => '<user name>'
        ),
        'host'              => '<smtp host>',
        'name'              => '<smtp name>'
    )
);
$subject            = '<subject>';
$textContent        = 'text content';
$toEmailAddress     = '<your@user-doma.in>';
$toName             = '<user name>';
$transporter        = new \Zend\Mail\Transport\Smtp();
//end of parameters

//begin of text content creation
$textPart = new \Zend\Mime\Part($textContent);

$textPart->setCharset($encoding );
$textPart->setType(\Zend\Mime\Mime::TYPE_TEXT);

$body->addPart($textPart);
//end of text content creation

//begin of html content creation
$htmlPart = new \Zend\Mime\Part($htmlContent);

$htmlPart->setCharset($encoding );
$htmlPart->setType(\Zend\Mime\Mime::TYPE_HTML);

$body->addPart($htmlPart);
//end of html content creation

//begin of building and sending the mail
$envelope->setFrom($bounceEmailAddress);
$envelope->setTo($toEmailAddress);

$message->setBody($body);
$message->addFrom($fromEmailAddress, $fromName);
$message->addReplyTo($bounceEmailAddress);
$message->setSubject($subject);
$message->addTo($toEmailAddress, $toName ;
$message->setEncoding($encoding );

$transporter->setEnvelope($envelope);
$transporter->setOptions($options);
$transporter->send($message);
//end of building and sending the mail
Hopefully, this will speed up your problem solving. It took me longer than wished and expected to fix this issue.
It was strange to do an header dump and seeing the correct "Return-Path", because the smtp is rewriting it on its own.

Following some links I used to fix this problem:

By the way and just to put another simple example into the web. Following an easy way to handle bounce emails (return path) via sendmail.


$bounceEmailAddress = '<unique bounce email address>';
$encoding           = 'UTF-8';
$fromEmailAddress   = '<from@your-doma.in>';
$fromName           = '<your name>';
$subject            = '<subject>';
$textContent        = 'text content';
$toEmailAddress     = '<your@user-doma.in>';
$toName             = '<user name>';

$header = 'From: ' . $fromEmailAddress . ' <' . $fromEmailAddress . '>' . "\r\n"; iniset('sendmailfrom', $fromEmailAddress); mail($toEmailAddress, $subject, $textContent, $header, '-f' . $bounceEmailAddress); //-f is the magic trigger to set an return path

Translate to de es fr it pt ja

Meld, my favorite git mergetool

So, I was searching for a git merge tool.
I know, cool kids are using vimdiff and I use it too. But right now, the force is not strong enough for using this four window layout. Because of that, I was searching for an easy to use, free as in freedom, merge tool.
After asking a lot of questions to my favorite search engine, I found meld, or to be precise, the gitguys found it.
Currently, I am really happy with it. But for sure, I will keep on learning the force to master vimdiff in the future.

Translate to de es fr it pt ja