The below example is a very simple TCP server script written in Perl, which uses the AnyEvent module. It will create a separate process for each connections and has the ability to return data to the parent process. The below … Continue reading
Category Archives: Development
A secure and very random password generator module written in Perl. It can be used to generate passwords or unique strings which can be used in sorts of operations. The default character set is alpha-numerical based, but can be set … Continue reading
There aren’t many Inotify daemons available that can work recursive and offer a descent flexibility regarding Inotify signals. For basic rsync operations, lsyncd isn’t that bad but it isn’t that flexible for system administration. The fact that it is written … Continue reading
Below is a small Perl example how to check for NFS mounted shares on a Linux host. The script does not need any specific modules, and makes use of the /etc/mtab file. #!/usr/bin/perl use strict; use warnings; my @mount_points = … Continue reading
There are definetly a few modules on CPAN which will allow to easily change file permissions in Perl, but you do not always have the chance or possibility to install CPAN modules. The following examples explain how to change the … Continue reading
In some situations, you need to watch a directory for uploaded files and move/process them immediately. Many scripts work in a polling kind of way, which will check every x amounts of seconds for new files. This is nowadays completely … Continue reading
When you are not using Debian unstable or some kind of Linux distro that hasn’t got the latest version of the dmesg command, you will not be able to execute ‘dmesg -T‘ to see human readable timestamp in the output. … Continue reading
Recently I have been asked to write a Syslog event generator, but not just a normal syslog generator, it had to be able to generate events coming from different hosts. The normal ‘logger’ command sends Syslog messages using the machine’s … Continue reading
Geotagging photos used to be a very expensive operation, since you needed special equipment, heavy antennas and especially: a lot muscles to carry all your extra gear. Nowadays, a lot of people have iPhone or like me, an Android phone. … Continue reading
Putting photos on a website has always been a pain. There were always a few steps you had to do, before they could be seen on your webpage. Of course, nowadays there are services like Flickr, Picassa, Panoramio, Facebook … … Continue reading