Skip to content

How to update your arch linux without the kernel

If you are using archzfs and the zfsonlinux, you know that it can happen from time to time that you have to wait until packages are updated to the newest kernel (or lts kernel). Whenever you want to upgrade your system, you get an error like the following.

:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: spl-linux-lts: installing linux-lts (4.9.32-1) breaks dependency 'linux-lts=4.9.30'
:: zfs-linux-lts: installing linux-lts (4.9.32-1) breaks dependency 'linux-lts=4.9.30'
:: zfs-utils-linux-lts: installing linux-lts (4.9.32-1) breaks dependency 'linux-lts=4.9.30'

To update your system without the kernel (and its dependencies), you can use the following trick.

#example if you use the lts kernel
#if you use plain pacman
pacman -Syyu --ignore=linux-lts,linux-lts-headers
#if you use pacaur
pacaur pacman -Syyu --ignore=linux-lts,linux-lts-headers

Thats it :-).

Translate to de es fr it pt ja

Die IKEA Hotline und wie ich am Computer vorbei zu einem echten Berater gekommen bin.

IKEA bietet auf seinem Impressum und auch sonst überall nur eine Telefonnummer an, um mit ihnen in Kontakt zu treten. Es ist die "061 92 / 93 99999". Diese Nummer ist auch gern mal nicht verfügbar.

Wenn sie verfügbar ist, wird man von einem Computer empfangen. Die Spracherkennung ist eher so 1990 und auch sonst ist das Ding eher Marke "Weißglut" als Marke "Service". Im Vergleich zu anderen computergestützten Hotlines bringt einen das Fluchen hier nicht weiter. Was mich zu einem echten Berater gebracht hat waren die Worte "mit einer echten person sprechen". Viel gebracht hat es leider nicht, die Berater haben auch eher so Teilzeitwissen über das Sortiment oder über allgemeine Fragen zur Onlinebestellung.

Aktualisierung (11.02.2017)

Mit "scheiße, scheiße" kommt man auch an das Ziel zur echten Person. Wichtig, immer erst das Einrichtungshaus wählen.

Translate to de es fr it pt ja

disable automatic selected "Allow comments to this entry" for each entry in serendipity (s9y) blog system

For real, I was searching for this option for a year now and couldn't find an answer in a readme.

By disabling users in an other setup and restricting other users right, I found the magic checkbox I was searching for. Following the clickpath: Settings->Users->Edit User->Default settings for new entries->Allow comments to this entry Choose the radio button "no" and everything is working as expected :-).

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

Zend Framework 2 - Lazy Factory - Kickstarter (for ZF 2.4)

No blabla, just how you do it with zend framework 2.4.

#add following line to your composer.json
"ocramius/proxy-manager": "1.0.*",

composer update

#add following lines to your module.config.php
'lazy_services' => [
    'class_map' => [
        \My\Class::class => \My\Class::class
    ]
],
'service_manager' => [
    'delegators' => [
        \My\Class::class => [
            \Zend\ServiceManager\Proxy\LazyServiceFactory::class
        ]
    ],
    'factories' => [
        \My\Class::class => \My\ClassFactory::class,
        \Zend\ServiceManager\Proxy\LazyServiceFactory::class => \Zend\ServiceManager\Proxy\LazyServiceFactoryFactory::class
    ]
]

Thats it.

Useful links are a gist from a closed issue and somehow an official howto (maybe working with zend framework greater 2.4).

Translate to de es fr it pt ja

X11 freezes and system total hang up on an Lenovo X250 i7-5600U since kernel 4.6.2 (arch linux)

Hey folks, since kernel 4.6.2 I got a lot of X11 freezes as well as unusable gui tools (delayed inputs, scrolling and broken display rendering). Also all the virtual box clients are behaving the same. Only the chromium gui and xterm were usable (well, xterm only on my host, not on the virtual box clients).
I tried my best and here are the changes I made that stopped the system from a total freeze since four days:

run as root

cat /etc/X11/xorg.conf.d/20-intel-graphics.conf < DELIM Section "Device" Identifier "Intel Graphics" Driver "intel" Option "AccelMethod" "uxa" Option "NoAccel" "True" EndSection DELIM

I am crossing fingers it is working on your machine also.

Translate to de es fr it pt ja

migration from owncloud 9 to nextcloud 9.0.50

I just migrated my installation from owncloud 9 to nextcloud 9.0.50.
Only one thing is not working, the notes application simple shows me an empty list of notes. beside that, it is more like a new theme.

At the moment we only support manual migrations from ownCloud 8.2 and 9.0 to Nextcloud 9.

To do that please follow the usual upgrading steps:

* Delete everything from the ownCloud folder except data and config
* Download the Nextcloud 9 release from https://nextcloud.com/install/43
* Put the files into the folder where the ownCloud files where before
* Trigger the update either via OCC or via web.

source

I did the following steps.

make a backup of your database

log into your server and cd to the owncloud path

#

assuming your installation is in the directory "cloud"

./occ maintenance:repair cd .. wget https://download.nextcloud.com/server/releases/nextcloud-9.0.50.zip unzip nextcloud-9.0.50.zip cp -rv cloud/config nextcloud/ cp -rv cloud/data nextcloud/ mv cloud owncloud mv nextcloud cloud cd cloud ./occ upgrade ./occ app:list

enable the apps you want

Update from 2016-06-26
I created a small upgrade.sh script. Here it is.

!/bin/bash

@author stev leibelt artodeto@bazzline.net

@since 2016-06-26

begin of runtime environment validation

if [[ $# -lt 1 ]]; then
echo "invalid number of variables provided"
echo "upgrade.sh "
exit 1
fi

if [[ -d backup ]]; then
echo "backup directory sill exists"
exit 1
fi

end of runtime environment validation

begin of local runtime variables

LOCALCURRENTDATE=$(date +'%Y-%m-%d')
LOCALURLTOTHENEXTVERSION="$1"
LOCAL
PUBLICBACKUPPATH="public$LOCALCURRENT_DATE"

end of local runtime variables

begin of downloading new version

wget $LOCALURLTOTHENEXT_VERSION
unzip *.zip

end of downloading new version

begin of making backups

cd public
tar --ignore-failed-read -zcf "public.$LOCALCURRENTDATE.tar.gz" public
./occ maintenance:singleuser --on
cd ../
mkdir backup
cp -rv public/config backup/
cp -rv public/data backup/
mv public $LOCALPUBLICBACKUP_PATH

end of making backups

begin of upgrade

mv nextcloud public
cp -rv backup/config public
cp -rv backup/data public
cd public
./occ upgrade
./occ maintenance:singleuser --off
echo "enable the apps you need with ./occ app:enable "
./occ app:list

end of upgrade

Translate to de es fr it pt ja

Propel, the PropelOnDemandFormatter, self loaded runtime properties and your special reload data if needed usecase- howto

Propel column representation offering the option to add some business logic inside. We are making this from time to time by enriching the existing object with more data, but only when a method is called explicit.


class MyTable extends BaseMyTable
{
    /** @var null|\My\Enriched\MyTable\Data */
    protected $enrichedData;

/**
 * @return null|\My\Enriched\MyTable\Data
 */
public function getEnrichedData()
{
    //prevent reloading enriched data if this method is called more than once
    if ($this->noEnrichedDataYetLoaded()) {
        //do something heavy data lifting
        $this->enrichedData = $this->tryToLoadEnrichedData();
    }

    return $this->enrichedData;
}

/**
 * @return bool
 */
private function noEnrichedDataYetLoaded()
{
    return (is_null($this->enrichedData));
}

}

If you would use the corrosponding MyTableQuery object in combination with a PropelOnDemandFormatter and iterating over an collection after calling find(), you would get the same enriched data for different MyTable objects.
Why? Because the PropelOnDemandFormatter does a smart thing by reusing the on MyTable object and "just" updating the properties.
Following is a workaround I am using to fix this (totally right) behaviour. Anyways, be caution if you do things like that. This should not be your regular way of doing it.


class MyTable extends BaseMyTable
{
    /** @var null|\My\Enriched\MyTable\Data */
    protected $enrichedData;

/** @var int */
protected $myId;

/**
 * @return null|\My\Enriched\MyTable\Data
 */
public function getEnrichedData()
{
    //prevent reloading enriched data if this method is called more than once
    if ($this->noEnrichedDataYetLoaded()) {
        //do something heavy data lifting
        $this->enrichedData = $this->tryToLoadEnrichedData();
        $this->myId         = $this->getId();
    }

    return $this->enrichedData;
}

/**
 * @return bool
 */
private function noEnrichedDataYetLoaded()
{
    return (
        ($this->myId == $this->getId())
        &&amp; (is_null($this->enrichedData))
    );
}

}

Translate to de es fr it pt ja

Reminder of the Propel Bug 734 - update() with limit() and a workaround

Just because we ran into this issue again. There is known and serious bug in propel whenever you use "update()" in combination with "limit()".
Our workaround right now is to replace the code.


//this will update all entry with the content "bar" in the column "foo"
MyQuery::create()
    ->filterByFoo('bar')
    ->limit(100)
    ->update(
        array(
            'Foo' => 'baz'
        )
    );

//this will only update 100 rows $ids = (array) MyQuery::create() ->filterByFoo('bar') ->limit(100) ->select( array( 'Id' ) ) ->find();

MyQuery::create() ->filterById($ids) ->update( array( 'Foo' => 'baz' ) );

Translate to de es fr it pt ja

howto - php composer - File(/etc/pki/tls/certs) is not within the allowed path(s) - on arch linux

Since a few days (or weeks?), I discovered the following issue on one of my Arch Linux system.
Whenever I try to use PHP's composer, I got the following issue:


[ErrorException]
is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): (/srv/http/ [...]

Well, it didn't hurt that much since I am using (like every cool webkiddy is doing) docker or vagrant for my development. But this time, I needed to solve it since it is a customer edge case - so I solved it.
The how to I will show you is not the perfect way. I had two things in mind, try to minimize the place I have to adapt the php.ini. And try to keep the system as normal as possible. Until now, I can not estimate the security holes I opened with this setting. I will let you know if this how to turns out to be a "don't try this at home" thing.

So, what have I done?
First of all, I asked curl to tell me where it is looking for certificates by executing:


curl-config --ca

output: /etc/ssl/certs/ca-certificates.crt


After that I had a look what this path is:

ls -halt /etc/ssl/certs/ca-certificates.crt

output: [...] /etc/ssl/certs/ca-certificates.crt -> ../../ca-certificates/extracted/tls-ca-bundle.pem


So, with that knowledge it turned out that the following steps are reflecting my requirements mention above.

sudo mkdir -p /etc/pki/tls/certs
sudo ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-certificates.crt
sudo vi /etc/php/php.ini

add following lines to "open_basedir" configuration section

:/etc/pki/tls/certs:/etc/ssl/certs


And that is it, composer should now be back in business.

Translate to de es fr it pt ja

zf-rest - error "title":"Not Found","status":404,"detail":"Entity not found."

I configured the routes as well as the other parts pretty well.
An important step to solving the issue was adding the following configuration section into my project "local.php".


    //this is possible overwritten by the zf-rest module
    'view-manager' => array(
        'displayexceptions' => true,
        'displaynotfoundreason' => true
    )

After that, I got back an response with the following content:
{"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html","title":"Not Found","status":404,"detail":"Entity not found."

After adding a lot of debugging statements in the "ZF\Rest\RestController" (search for "Entity not found." ;-)), started understanding the issue.
The answer is pretty clear after all. Whenever you listen on a GET HTTP Method with your listener, you have to return an array with the configured "routeidentifiername" (the entity identifier), otherwise the controller as well as the HAL post processor is not able to successful build the response.

Translate to de es fr it pt ja

uberspace and let's encrypt

Nichts besonderes, ich habe einfach nur das Wissen aus dem wiki und dem blog genommen und ich ein shell script gepackt.

Das Resultat ist folgender Cronjob, der einmal aller 60 Tage läuft.

!/bin/bash -l

#

@see:

https://blog.uberspace.de/lets-encrypt-rollt-an/

https://wiki.uberspace.de/webserver:https?s[]=lets&s[]=encrypt

@author: stev leibelt <[email protected]>

@since: 2015-12-28

#

begin of local parameters

LOCALROOTPATH='/home/<user name>' LOCALLOGPATH=$LOCALROOTPATH'/<path to your log files>' LOCAL_ACCOUNT='<your.domain.tld>'

end of local parameters

begin of parameters for letsencrypt-renewer

LOCALCONFIGURATIONPATH=$LOCALROOTPATH'/.config/letsencrypt' LOCALLOGGINGPATH=$LOCALROOTPATH'/.config/letsencrypt/logs' LOCALWORINGPATH=$LOCALROOTPATH'/tmp/'

end of parameters for letsencrypt-renewer

begin of parameters for uperspace-prepare-certificate

LOCALKEYPATH=$LOCALROOTPATH'/.config/letsencrypt/live/'$LOCALACCOUNT'/privkey.pem' LOCALCERTIFICATEPATH=$LOCALROOTPATH'/.config/letsencrypt/live/'$LOCALACCOUNT'/cert.pem'

end of parameters for uperspace-prepare-certificate

letsencrypt-renewer --config-dir $LOCALCONFIGURATIONPATH --logs-dir $LOCALLOGGINGPATH --work-dir $LOCALWORINGPATH &>$LOCALLOGPATH uberspace-prepare-certificate -k $LOCALKEYPATH -c $LOCALCERTIFICATEPATH &>>$LOCALLOGPATH

In schön gibt es das script auch noch einmal hier.
Großen Dank an uberspace und lets encrypt.

Damit das script funktioniert, müsst ihr natürlich zu erst lets encrypt aufsetzen:


uberspace-letsencrypt 
letsencrypt certonly
Ich bin recht faul. Aus diesem Grund lass ich mir die Zertifikate einmal im Monat neu generieren. Um die Infrastruktur nicht zu sehr zu belasten, habe ich mir einen anderen Tag, als den Ersten im Monat ausgesucht. Das gleiche gilt für die Uhrzeit.

Translate to de es fr it pt ja

determine if an apache process is still running via bash to prevent multiple instances running

Given is the fact that you have some processes (like cronjobs) executed via an webserver like apache. Furthermore you have installed and enables apache server status. To add some re usability benefits, we should divide and conquer the problems into either shell scripts or shell functions. Side note, if I am writing about shell, I am in the bash environment. What are the problems we want to tackle down?:

  • find the correct environment
  • check all available webservers if a process is not running
  • specify which process should not run and start it if possible

We can put the first two problems into shell functions like the following ones. I am referencing to some self written shell functions. The reference is indicated by the "net_bazzline_" prefix.

#!/bin/bash
#find the correct environment

if net_bazzline_string_contains $HOSTNAME 'production';
    NET_BAZZLINE_IS_PRODUCTION_ENVIRONMENT=1
else
    NET_BAZZLINE_IS_PRODUCTION_ENVIRONMENT=0
fi

And the mighty check.

#!/bin/bash
#check all available webservers if a process is not running
####
# @param string <process name>
# @return int (0 if at least one process was found)
####
function local_is_there_at_least_one_apache_process_running()
{
    if [[ $# -lt 1 ]]; then
       echo 'invalid number of arguments'
       echo '    local_is_there_at_least_one_apache_process_running <process name>'

       return 1
    fi

    if [[ $NET_BAZZLINE_IS_PRODUCTION_ENVIRONMENT -eq 1 ]]; then
        LOCAL_ENVIRONMENT='production'
    else
        LOCAL_ENVIRONMENT='staging'
    fi

    #variables are prefixed with LOCAL_ to prevent overwriting system variables
    LOCAL_PROCESS_NAME="$1"

    #declare the array with all available host names
    declare -a LOCAL_HOSTNAMES=("webserver01" "webserver02" "webserver03");

    for LOCAL_HOSTNAME in ${LOCAL_HOSTNAMES[@]}; do
        APACHE_STATUS_URL="http://$LOCAL_HOSTNAME.my.domain/server-status"

        OUTPUT=$(curl -s $APACHE_STATUS_URL | grep -i $LOCAL_PROCESS_NAME)
        EXIT_CODE_OF_LAST_PROCESS="$?"

        if [[ $EXIT_CODE_OF_LAST_PROCESS == "0" ]]; then
            echo "$LOCAL_PROCESS_NAME found on $LOCAL_HOSTNAME"
            return 0
        fi
    done;

    return 1
}

And here is an example how to use it.

#!/bin/bash
#specify which process should not run and start it if possible

source /path/to/your/bash/functions

LOCAL_PROCESS_NAME="my_process"

local_is_there_at_least_one_apache_process_running $LOCAL_PROCESS_NAME

EXIT_CODE_OF_LAST_PROCESS="$?"

if [[ $EXIT_CODE_OF_LAST_PROCESS == "0" ]]; then
    echo "$LOCAL_PROCESS_NAME still running"
    exit 0;
else
    #execute your process
    echo 'started at: '$(date +'%Y-%m-%d %H:%M:%S');
    curl "my.domain/$LOCAL_PROCESS_NAME"
    echo 'started at: '$(date +'%Y-%m-%d %H:%M:%S');
fi

You can put this into a loop by calling it via the cronjob environment or use watch if you only need it from time to time:

watch -n 60 'bash /path/to/your/shell/script'

Enjoy your day :-).

Translate to de es fr it pt ja

Automatic setting of your multi display setting

So you have an X server running with multiple displays (or monitors).
You are using the great arandr tool to quickly setup your setting. But, you don't want to do this each time you are starting your X.
What can you do?
First of all, hit the "Save As" button in you arandr gui and store the shell script.
Afterwards, adapt the file that is read once you login into your system or start your X. This can be .xinit, .login or .profile.
Inside this file, simple add the adapted content from below and thats it.

maybe you have to change the path ".screenlayout" or the file name "default.sh"

if [ -f $HOME'/.screenlayout/default.sh' ]; then
. $HOME'/.screenlayout/default.sh'
fi

Translate to de es fr it pt ja

PHP DateInterval::__construct(): Unknown or bad format - trouble with ISO 8601 Date Format

To keep it short, you code is failing because of an message like:


DateInterval::__construct(): Unknown or bad format (P0Y2M7DT-1H7M14S) 
Why? Well it is obvious if your eyes are fresh, otherwise well hidden.
The bad thing is the "-" between "T" and "1". Cover your string by let it run through str_replace('-', '', $dateIntervalAsString) and you are a step closer to pretty safe code.
How can this happen?
First of all, by strange data and secondly by trying to solve the date format on your own. Really, old code is your enemy at this point.

For the sake of input and output, here are some important links:

Translate to de es fr it pt ja

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

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   = '<[email protected]>';
$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     = '<[email protected]>';
$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   = '<[email protected]>';
$fromName           = '<your name>';
$subject            = '<subject>';
$textContent        = 'text content';
$toEmailAddress     = '<[email protected]>';
$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

blockify-ui stops working with error: Xlib: extension "GLX" missing on display ":0".

So you updated your blockify and you wanted start it.
Instead of the blockify ui, you are getting the following error on the command line:


Xlib: extension "GLX" missing on display ":0".
What to do?
Try to install mesa-libgl and everything should be fine again.

Translate to de es fr it pt ja

virtual box "5.0.4" bridged networking connection issue between guest and host (windows 10)

Since we spent days (let me write it again, daaayyyyyyssss) to solve this problem. To prevent you from doing the same, I write this entry.
Our problem was, that a guest box was running fine on a virtual box host. The "only" issue was, that everyone could ping (and even do more) with the host and the guest os, except the host talking with the guest and vice versa.
It looks like this is a microsoft windows 10 issue only. Everything is workin on my *nix systems - meaning, if you are using real software, no problem is there.
But seriously folks (I know you are not reading this entry because you want to have some funny battle from good, free as in freedom software, against clunky ugly and bad close source whatever), the solving of this issue is braindead simple.


It a also contains a workaround: 
- Open the network adapters in Windows 10
- Open properties of the adapter used in your guest OS
- Disable IPv6 -> OK
- Open properties again
- Enable IPv6 -> OK
source
ticket number 14457
ticket number 14428

Good luck and stay with the force.

Translate to de es fr it pt ja

howto - add type hinting to phpstorms generated setter method

A colleague of me forwarded me this super cool solution/template to remove one of the little annoying corners of the great PHPStorm IDE (beside the sad fact, that it is closed source software of course).
The template is fixing the problem with the generated setter methods and the missing type hinting.

Open PhpStorm's Preferences and "File and Code Templates" menu, under the "Code" tab there's an option called "PHP Setter Method". Modify it to look like this:
#set($typeHintText = "$TYPE_HINT ")

First we check against a blacklist of primitive and other common types used in documentation.

set($nonTypeHintableTypes = ["", "string", "int", "mixed", "number", "void", "object", "real", "double", "float", "resource", "null", "bool", "boolean"])

foreach($nonTypeHintableType in $nonTypeHintableTypes)

#if ($nonTypeHintableType == $TYPE_HINT)
    #set($typeHintText = "")
#end

end

Make sure the type hint actually looks like a legal php class name(permitting namespaces too) for future proofing reasons.

This is important because PSR-5 is coming soon, and will allow documentation of types with syntax like SplStack

if (!$TYPEHINT.matches('^((\)?[a-zA-Z\x7f-\xff][a-zA-Z0-9_\x7f-\xff]+)+$'))

#set($typeHintText = "")

end

Next, we check if this is using the array syntax like "MyClass[]", and type hint it as a plain array

if ($TYPE_HINT.endsWith("[]"))

#set($typeHintText = "array ")

end

/** * @param ${TYPEHINT} $${PARAMNAME} */ public ${STATIC} function set${NAME}($typeHintText$${PARAM_NAME}) {

if (${STATIC} == "static")

self::$${FIELD_NAME} = $${PARAM_NAME};

else

$this->${FIELD_NAME} = $${PARAM_NAME};

end

}


source
File Template Variables

Translate to de es fr it pt ja

gosh, why is my vendor directory consuming so much diskspace?

"Saving disk space on your composer projects" was a headline for an older entry I made.
I used this project and figured out it has a lot of bugs because of its "outdateness". Thats why I spend some time to create a build script, build a new "compify.phar" and created a pull request to it. Sadly, no response or action has been done by carlos (also no response on any e-mail).
I did the pull request on 28.07.2015, meaning a lot of water is gone down the river since then.
After waiting and waiting, I gave up and simple added my created "compify.phar" in a project called php project maintenance. As given by the name, this project has to goal to easy up maintenance for php projects ;-).
The, currently, best script inside is updateallrepositories which simple tries to find all git repositories from your current working directory. Inside each directory, it is doing some git stuff and also - since today - using compify to clean up the vendor diskspace. If you want to automate that kind of process, feel free to use it and pull some requests if there is something that can be optimized.

Translate to de es fr it pt ja

hardinfo on a linux live cd - A system information, profiling and benchmark tool.

The task for today was to figure out what kind of hardware was in a bunch of cases without open them all.
I know there are a lot tools for windows available out there, but finding something running on an linux system was not that easy - at least for me.
After a while, I had verified that hardinfo was the tool I am searching for. But this simple leads me to another question and problem. "What kind of available live linux cds has this application available directly?".
It turned out that this is not an easy question to answer. But after a lot of download, try and validate runs, I found one, tahrpup a puppylinux flavored release.
I really hope you will find this post and this will save you ... well, half of a day of evaluation.

Translate to de es fr it pt ja