Archive for the ‘Tools’ Category


Ktools PhotoStore batch image regenerate

Ktools PhotoStoreThe Ktools PhotoStore software ( automatically generates thumbnails, sample and large images with watermarks of the images in the database. If you change the settings regarding the image sizes only newly added images will get the new sizes.

The following simple script regenerates / resizes the thumbnails, sample and large images from the original images. It runs in batch mode, i.e it will work on every image you have in your stock_photos folder. It will overwrite your current i_, s_ and m_-versions of your images without warning. The sizes is set in the script (it does not read the current settings in the manager).

# for Ktools Photo Store -
# Copyright 2010-12-27 HelTech Communication, Stefan Helander
# This script may be downloaded from and used for free. It is not
# allowed to redistribute this script without written permission.
# Requires GraphicsMagick - gm
# Regenerates thumbnail, sample and large images for Ktools Photo Store.
# Copy this file to photostoreroot/stock_photos and execute it
# in that folder. If necessary adjust the sizes below.
# !!! WARNING !!! This script overwrites current m_, s_ and i_versons
# of your current images without question.
COMMAND=”gm convert”
FILES=`ls *.jpg | grep -v “^m_” | grep -v “^s_” | grep -v “^i_”`
for FILE in $FILES

# Make i_ image
$COMMAND -size $I_SIZE "$FILE" -resize $I_SIZE "i_$FILE"
# Make s_ image
$COMMAND -size $S_SIZE "$FILE" -resize $S_SIZE "s_$FILE"
# Make m_ image
$COMMAND -size $M_SIZE "$FILE" -resize $M_SIZE "m_$FILE"



Posted by on December 27th, 2010 No Comments

mysqldump to multiple files

It is a good idea to run mysqldump by cron to regurlarly make backups of your MySQL databases. An easy way to do this is by adding the –all-databases parameter.  This way you will have a backup of all your databases – in one file though. If the amount of data and the number of databases is small this might be ok.

After the first session of restoring just one database or one table from your one-file-backup you realize that it would be nice to have the dumps split up in some convenient way. Like dumping each database to one file, one for each database.

This little shell script does the trick for you. It is really simple and has no error handling what so ever. It is released under GNU GPLv2 license. If you modifiy it or add features (like error handling or so), please do send me a copy or post it as a comment here.

# Copyright HelTech Communication, Stefan Helander 2010
# [email protected],
# Licensed under GNU GPLv2
# Dumps all MySQL databases. Each database stored in a single file.
# settings


# dump each db

for DB in `echo 'show databases' | $MYSQL -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS --batch -N`
$MYSQLDUMP -h$MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS --quote-names --create-options --force $DB > $DUMPDIR/$DB.sql


Posted by on April 29th, 2010 2 Comments

Google streets – now in Sweden and Denmark

Until recently Google streets has not been availible for Sweden and Denmark. There has been local sites with a similar function, like But now you can also use Google streets for your virtual tour to Sweden and Denmark. Not only the large cities but also smaller villages and country roads can be seen in Google streets.

To use Google streets go to, find your place of interest, click and hold the little orange man that stands just above the zoom handle and put him down on the street you want to visit. Streets with photos will get blue borders when you lift the little man and you can of course only put him down on such streets.



Posted by on February 1st, 2010 No Comments

Mac-adress lookup tool

When troubleshooting networks, when there is an IP-address conflict for example, it is sometimes useful to lookup the vendor of the mac-addresses. This way you can identify the brand of the conflicting host.

A tool for doing this is found here. It contains information about both ethernet and bluetooth manufacturers.


Posted by on April 22nd, 2009 No Comments

What is my current IP-address?

When you need to know what your current IP-adress on the Internet is, there is a tool:

This page displays your current IP-adress, your reverese DNS name, how your browser identifies itself and if you are accessing the Internet through a proxy server. This is the information servers that you visit on the internet will see about you.


Posted by on March 15th, 2009 No Comments

Traceroute, looking glass and whois servers

In order to analyze and troubleshoot networking issues over the Internet, there are a number of traceroute and looking glass servers availble. By using these, you can analyse the routing paths to your network. You are able to see how your network is beeing reached from different parts of the Internet.

A collection of traceroute and looking glass servers is found on

On Geektools you will find a collection of useful tools like traceroute and a whois lookup (who owns a certain IP-address). has a whois gateway for looking up who owns a certain IP-address.


Posted by on March 3rd, 2009 No Comments