PHP: Remove “empty” elements from Array

I recently read more about functional programming and found some functions in PHP that tend in that direction.

Like this function that removes all empty entrys from a array:

To understand what array_filter does, have a look at this version with foreach():

Linux: md0 : active (auto-read-only) raid1

When you see this message in /proc/mdstat, it means that the raid partition is in auto-read-only mode. This mode is set when the device has not been written to since the last check.
In case of a normal partition, just try to write a file and the mode should disappear.
When its a swap partition, you can use this commands:

I got a cron email with this content, so i started investigating:

It seas about a Warning (W:), but i think it should rather be a notice…

Ubuntu: 12.04 wrong layout when using Logitech Keyboards

I had a strange bug after installing Ubuntu 12.04 Precise Pangolin or Xubuntu.
Even when i selected “German” keyboard layout while installation, after a reboot the keyboard layout always switched back to English when using my Logitech K400 keyboard. When using other keyboards the bug did not appear.
The solution was to add a second keyboard layout like “German (without accents)”, what stopped switching back to English layout when using my Logitech K400 keyboard.

FFmpeg: Split mp4/xvid/avi/mkv Video file in parts

You can use this command to split any Video FFMpeg supports in parts:

Read: Tunneling via DNS

There a several ways of tunneling data through other services, like SSH or HTTP Proxys.
But it is also possible to tunnel via DNS, which is sometimes available in very restricted networks like Airport WLAN and such.

It works pretty straight forward:

You need a server and a domain. Setup a nameserver record and install one of the available DNS tunneling daemons.
Setup a client with the DNS tunneling client and tunnel your data through DNS requests.
Instead of sending dns requests like:
-> ‘Hey Server, what ip has www.google.com?’
<- 'Ist has 8.8.8.8 dear client'
the system will send something like this:
-> ‘Hey Server, please send this paket for me: base64[packet(http, get 'www.google.com')].mydomain.com’
<- 'Dear client, base64[Response(first part, '‘)]’
<- 'Dear client, base64[Response(second part, '…’)]’
<- ...
The server has to send multiple packets because DNS responses have a limited size. Also the transferred data is base64 encoded, otherwise it could not be transferred via the DNS protocol.

Check out this pages if you like to know more:

https://wiki.koumbit.net/DnsTunnel

http://dnstunnel.de/