Skip to content

Die KW 07/2018 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 06/2018 im Link-Rückblick

Translate to de es fr it pt ja

nextcloud upgrade 13 - how to upgrade from nextcloud 12 to 13

I am doing all via the command line. I've a separate data directory (not included below public/data).

Here are my simple steps (database backup not included). I did the upgrade from the latest 12 release. This is a KISS tutorial.

cd <root path>
wget "https://download.nextcloud.com/server/releases/nextcloud-13.0.0.zip"
unzip nextcloud-13.0.0.zip
mv public public_12_0_5
mv nextcloud public
cp public_12_0_5/config/config.php public/config/config.php
rsync -rv --dry-run public_12_0_5/apps public/apps
#if needed
#rsync -rv public_12_0_5/apps public/apps

Good luck on your side.

Currently, I've found one issue with my news application.

I needed to execute following SQL statement:

UPDATE oc_jobs SET reserved_at = 0 WHERE (argument = '["OCA\\News\\Cron\\Updater","run"]' OR class = 'OCA\\News\\Cron\\Updater');

Thanks to the how to fix it section.

Translate to de es fr it pt ja
Categories: others
Defined tags for this entry: ,
Vote for articles fresher than 7 days!
Derzeitige Beurteilung: 1 of 5, 6 Stimme(n) 151 hits

Hint, never ever name a column "database_name" or "table_name" when you are using PHP's Propel

Defining a column name inside a table definition "database_name" or "table_name" will result in duplicated generated constant definition which will be an evil fail you have to debug for some minutes.

Super hint! Name them "the_database_name" and "the_table_name" :-D.

Translate to de es fr it pt ja
Categories: coding
Defined tags for this entry: , ,
Vote for articles fresher than 7 days!
Derzeitige Beurteilung: 1 of 5, 6 Stimme(n) 127 hits

Die KW 05/2018 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 04/2018 im Link-Rückblick

Translate to de es fr it pt ja

quick one, output the license for each composer.json project within a root path

A quick one since I have to alligne all my open source packages to theSPDX License List. To list all available licenses from my root path, I've quickly written this one liner.

find . -maxdepth 2 -name composer.json -type f -exec grep -i -H license {} \;

Boy, to write this one liner without having a look to one man-page took me ... well, ages.

Translate to de es fr it pt ja
Categories: coding
Defined tags for this entry: , , ,
Vote for articles fresher than 7 days!
Derzeitige Beurteilung: 1 of 5, 3 Stimme(n) 124 hits

Die KW 03/2018 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 02/2018 im Link-Rückblick

Translate to de es fr it pt ja

"vendor/propel/propel1/generator/bin/phing.php: Permission denied"

I had to deal with an older project and wanted to update my database orm-code.

vendor/propel/propel1/generator/bin/phing.php: Permission denied

This error message is really general and it took me a while to find the solution. For whatever reason, the file "phing.php" has lost its execute flag. To fix this error, all you have to do is:

chmod +x vendor/propel/propel1/generator/bin/phing.php

This is it.

Translate to de es fr it pt ja
Categories: coding
Defined tags for this entry: ,
Vote for articles fresher than 7 days!
[-2] 226 hits

arch linux error: key "CEB167EFB5722BD6" could not be looked up remotely

On some machines, I get the following error when I run an "pacman -Syyu".

error: key "CEB167EFB5722BD6" could not be looked up remotely

I've found the best fox so far on this page.

#open /etc/pacman.d/gnupg/gpg.conf as root
#comment out existing server address and replace with following
#save the file afterwards
http://pool.sks-keyservers.net

#run following command as root
pacman-key --refresh-keys

#if the upgrade is still not working, signed the key (be aware to know what you are doing here!)
pacman-key --lsign-key CEB167EFB5722BD6

This was working on almost all machines. Only a few percent where still not able to be upgraded. What I did to fix this issue was to copy the the directory in "/etc/pacman.d/gnupg" from a working host to the not working one (make a backup first of course).

Translate to de es fr it pt ja
Categories: os
Defined tags for this entry: , ,
Vote for articles fresher than 7 days!
[-2] 809 hits

Die KW 01/2018 im Link-Rückblick

Translate to de es fr it pt ja

Uberspace und wie transparent sie mal wieder mit Problemen wie Meltdown und Spectre umgehen

Wieder ein Lob an Uberspace.

Sehr früh haben sie in ihrem blog informiert was alles passieren wird, weil sie die Server patchen müssen. Zudem verlinken sie noch ihre wiki-Seite. Und transparent, auch bei Problemen, sind sie über Twitter geblieben.

Top und fünf Euro extra in die Kaffeekasse für eure Mühe!

Und weil ich es knorke finde, dass ihr welche habt ... ich mag eure Sticker :-).

Translate to de es fr it pt ja

Wie ist es um unsere Gesellschaft bestellt? Das Radioprogramm und der erste Tag im neuen Jahr geben einen Aufschluss

Während der Weihnachtszeit und abschließend mit dem heutigen und ersten Tag im Jahr 2018 konnte ich zwei Beobachtungen machen, die einem recht einfach den aktuellen Stand unserer Gesellschaft aufzeigen können. Um in Weihnachststimmung zu kommen, durchsuchte ich nun das Internetradio nach Weihnachtsradionsendungen. Der Wunsch war es, etwas traditionelle und in deutsch gesungene Musik zu finden. Das Ergebniss war, dass unter 40 Webradiosendern, darunter ein großer Teil öffentlich rechtlicher Sender, kein einziger dabei war, der anders klang. Bis auf unterschiedliche oder fehlende Werbung ist der Inhalt gleich, gefühlte 20 englische Poplieder wurde via Heavy-Rotation in die Ohren der Bevölkerung gedrückt. Kurzum es wird eine Auswahlmöglichkeit suggeriert, die es faktisch nicht gibt.

Die nächste Beobachtung konnte ich heute vor Ort machen - gleiche Beobachtungen wurden mir auch aus anderen deutschen Städten berichtet. Es geht darum wie mit den Müllbergen der Knallerreste verfahren wird. Früher hat man sich noch am 01.01 an sein Stück Straße gestellt und seine paar Quadratmeter vom Müll bereinigt. Heute schiebt diese Aufgabe jeder gern der Straßenreinigung in die Schuhe. Lieber faul sein und mehr bezahlen statt selber etwas tuen - besonders wenn man den Mist selber gemacht hat.

Gesundes neues Jahr euch da draußen.

Translate to de es fr it pt ja
Categories: others
Defined tags for this entry: ,
Vote for articles fresher than 7 days!
[-2] 175 hits

Die KW 52/2017 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 51/2017 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 50/2017 im Link-Rückblick

Translate to de es fr it pt ja

Ocramius ProxyManager or the great library that does the heavy lazy loading lifting for you

Within the next few lines, I will show you how you can use the proxy manager and how low the setup fee is compared to self written code.

The setup fee

Give is, that you have installed the ProxyManager with Composer. Than, create a script like the following (I will name it foo.php because I like it ;-)).

<?php
/**
 * @author stev leibelt <[email protected]>
 * @since 2017-12-12
 */

require_once __DIR__ . '/vendor/autoload.php';

use ProxyManager\Factory\LazyLoadingValueHolderFactory;
use ProxyManager\Configuration;

$configuration = new Configuration();
$configuration->setProxiesTargetDir(
    __DIR__ . '/../cache'
);

spl_autoload_register(
    $configuration->getProxyAutoloader()
);

class A
{
    /** @var mixed */
    private $foo;

    public function __construct(
        $foo
    ) {
        echo __METHOD__ . PHP_EOL;
        echo 'Something will take very long.' . PHP_EOL;
        sleep(5);
        $this->foo = $foo;
        echo 'Done.' . PHP_EOL;
    }

    public function __call($name, $arguments)
    {
        echo __METHOD__ . sprintf(
            'name: >>%s<<, list of arguments: >>%s<<.',
            $name,
            implode(
                ',',
                $arguments
            )
        ) . PHP_EOL;
    }

    public function foo()
    {
        echo $this->foo . PHP_EOL;
    }
}

class B extends A
{
    /** @var mixed */
    private $constructorFoo;

    /** @var bool */
    private $isNotInstantiated;

    public function __construct(
        $foo
    ) {
        echo __METHOD__ . PHP_EOL;
        echo 'Superfast.' . PHP_EOL;
        $this->constructorFoo       = $foo;
        $this->isNotInstantiated    = true;
        echo 'Done.' . PHP_EOL;
    }

    public function __call($name, $arguments)
    {
        $this->instantiateIfNeeded();

        parent::__call($name, $arguments); // TODO: Change the autogenerated stub
    }

    public function foo()
    {
        $this->instantiateIfNeeded();

        parent::foo(); // TODO: Change the autogenerated stub
    }

    private function instantiateIfNeeded()
    {
        if ($this->isNotInstantiated) {
            parent::__construct(
                $this->constructorFoo
            );

            $this->isNotInstantiated = false;
        }
    }
}

echo ':: Construct A' . PHP_EOL;
$a = new A('a');
echo ':: Construct B' . PHP_EOL;
$b = new B('b');
echo ':: Construct C' . PHP_EOL;
$factory = new LazyLoadingValueHolderFactory(
    $configuration
);
$c = $factory->createProxy(
    A::class,
    function (&amp; $wrappedObject, $proxy, $method, $parameters, &amp; $initializer) {
        $wrappedObject = new A('c'); // instantiation logic here
        $initializer   = null; // turning off further lazy initialization
    }
);

echo ':: Begin A' . PHP_EOL;
$a->foo();
$a->bar('foo', 'bar', 'baz');
echo ':: End A' . PHP_EOL;

echo ':: Begin B' . PHP_EOL;
$b->foo();
$b->bar('foo', 'bar', 'baz');
echo ':: End B' . PHP_EOL;

echo ':: Begin C' . PHP_EOL;
$c->foo();
$c->bar('foo', 'bar', 'baz');
echo ':: End C' . PHP_EOL;

And finally, execute it (clear && php foo.php).

What have we done - the explanation of the script

First, we are creating a class "A" that does some complicated stuff. Than, we are trying to implement our own lazy loading logic by creating a class "B". Afterwards we are instantiating A, B and A with the proxy manager. Finally, we are calling two methods for each instantiation.

When you execute the script, you quickly will figure out that the instantiation of $a is taking as long as expected while $b and $c are almost instantly there. At the end $b and $c will react the same.

Why should you use the proxy manager if you can archive the same stuff with "just some lines of code"? Because the proxy manager reduced your maintenance coast. If "A" would change, you would have need to extend or change "B" as well (e.g. A gets another method) while you don't have to touch any piece of code when using the proxy manager. Secondly, proxy manager is well tested and used. If you find an issue, you can fix it since the code is open source and do something good for the world - because sharing is caring.

Translate to de es fr it pt ja
Categories: coding
Defined tags for this entry: , , ,
Vote for articles fresher than 7 days!
Derzeitige Beurteilung: 2 of 5, 2 Stimme(n) 289 hits

Die KW 49/2017 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 48/2017 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 47/2017 im Link-Rückblick

Translate to de es fr it pt ja

Die KW 46/2017 im Link-Rückblick

Translate to de es fr it pt ja

Firefox 56 to 57, my changed list of essential extensions to gain back freedom on the broken internet

Well, after ages and lots of donated money to the extension developer (yes, I do an you should do the same!), mozilla made fundamental changes in ther way how to extend their browser. Because of that, I need to update my collection of extensions.

Firefox 57? Thats the browser where you have to open "about:config", search for "pocket" and set the value to false for "extension.pocket.enabled" and "browser.toolbarbuttons.introduced.pocket-button". You also have to disable all the spam on your blank start page (new tab). And of course, disable and remove all cliqz related shit.

Here is my new list working with firefox 57. Lets see how well things are working out. The mozilla extension search results are as bad as google search results today.

  • AdBlocker for YouTube
  • HTTPSEverywhere
  • Open With
  • Tree Style Tab
  • Tree Style Tab Mouse Wheel
  • uBlock Origin
  • uMatrix
  • Disconnect
  • Vim Vixen or Tridactyl
  • Empty Cache Button
  • Tab Suspender
  • Quick Accept-Language Switcher
  • User-Agent Switcher
  • I don't care about cookies
  • Cookie AutoDelete

For the log, here is my old list working in firefox 56.

  • BarTab Lite
  • AdBlocker for YouTube
  • HTTPSEverywhere
  • Open With
  • Tree Style Tab
  • uBlock Origin
  • uMatrix
  • Disconnect
  • Cache Status
  • checkCompatibility
  • Firebug
  • Flashblock
  • HttpRequester
  • Locale Switcher
  • NoScript
  • Privacy Settings
  • Random Agent Spoofer
  • RequestPolicy
  • Selenium IDE Button
  • Self-Destructing Cookies
  • Session Manager
  • YouTube and Audio Downloader
  • Pentadactyl
Translate to de es fr it pt ja