Skip to content

resize images via shell

The Problem: You have a bunch of images (like files in an directory ;-)) you want to resize.

The Solution (an easy one):

#!/bin/sh mkdir 800px for f in *.jpg do convert $f -verbose -resize 800 -quality 90% -comment "powered by open source" 800px/$f done

As far as you see, this shell script creates a directory called "800px" and walks to every file with the ending "jpg". The script resize every file to a with of 800 pixels and saves it into "800px". Just change in the directoy with the images you want to resize and type in "sh path/to/my/convert/script.sh". If the command "convert" is not on your system, try to install "imagemagick".

Change session lifetime for phpmyadmin

Be aware that this can be security problem if you increase the session lifetime on a productive machine. Just do it on your local development machine where the database does not handle any sensitive data or informations. So far for the service announcements ;-).

Are you tired of logging in every 30 minutes to the phpmyadmin (currently it is unimportant that there is a mysql cli and tools like tora outside)?

Just edit your configuration file. This file should be in the path "/etc/phpmyadmin" (on debian) and is called "config.inc.php". In this file, you just have to add the following line to increase the session time to four hours.

$cfg['LoginCookieValidity'] = 14400;
You want to know more? Take a look at the phpmyadmin wiki

SmartOS - The Complete Modern Operating System?

SmartOS incorporates the four most revolutionary OS technologies of the past decade — Zones, ZFS, DTrace and KVM — into a single operating system, providing an arbitrarily observable, highly multi-tenant environment built on a reliable, enterprise-grade storage stack. With the introduction of KVM in SmartOS, you no longer have to give up the power of an enterprise-grade operating system in order to run legacy applications and stacks. SmartOS turns any server into a highly efficient hosting platform for multi-tenant, machine-to-machine, or storage applications. SmartOS offers unique, innovative tools for application developers, service providers and data center operators – tuned and hardened for modern datacenter deployment.
source

Sound exciting, i will give him a try (in the wintermonths of course :-) ).

I also found an entry on heise.de

Ein Entwicklerteam des Cloud-Providers Joyent hat den Hypervisor des Linux-Kernels auf den freien OpenSolaris-Kernel des Illumos-Projekts portiert. Wie die Entwickler schreiben, soll KVM (Kernel-based Virtual Machines) die OpenSolaris-Variante SmartOS um hardwaregestützte Virtualisierung erweitern – als Ergänzung zu der Virtualisierungstechnik Zones des Solaris-Kernels, mit der mehrere Benutzerzumgebungen gegeneinander abgeschottet unter einem Kernel laufen.
SmartOS bringt KVM in den Solaris-Kernel