Posted in 2011

2011-01-31 - „What time is it?” Using rdate/ntpdate to set time on Linux server

Ntpdate sets the local date and time on your machine by polling the Network Time Protocol (NTP - RFC 1305) server given as the server arguments to determine the correct time.

2011-12-25 - List all installed and available Perl modules

Code below provides list of modules which perl interpreter can find in runtime.

2011-01-24 - Apache2 - create password protected directory

My friend requested article about password protected access to public directories using .htpasswd file. Configuration of this is quite simple.

2011-01-23 - Creating ASCII ART MOTD

MOTD or „Message of The Day” in most Unix systems is displayed after successful login, but before execution of user shell. MOTD is used to send a common message to all system users (after login), in a more efficient manner than sending them all an e-mail message. MOTD message is stored in /etc/motd file.

2011-03-20 - Securing Linux: few tips for good configuration of SSHD

Most people install sshd daemon using command apt-get install open-sshd, and then forgets about making it more secure. In this article I will point out few sshd options which you should have in your sshd config when going to production.

2011-03-20 - Arrays in PostgreSQL quick example

PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays. Arrays of any built-in or user-defined base type, enum type, or composite type can be created. Arrays are not supper efficient way of doing things, but they are sometimes handy.

2011-01-19 - Group and count files by type in Perl (using file magic numbers)

Using object oriented libraries with File::Find module is not so obvious like it should be. But there is a way to do it in simple way - use closures in Perl. Now you probably think, „stop the bla bla talk, and show me code!”, so here it is:

2011-01-15 - The regular expressions guides

Wikipedia defines regular expressions like this:

2011-01-15 - Putting website into maintenance mode

When you have dynamic website with loyal users you should provide at least decent support and service for them. One of things you have to do when working on startup is maintenance of service, adding new features and so on …. How to do it right?

2011-10-13 - Using perl to extract files from large directory structure

When I work on Windows I use Activesite Active Perl to do some stuff.

2011-01-12 - Cron tip: prevent running multiple copies of the same job in HA environment

All cron jobs should prevent themselves from started in multiple copies!

2011-12-11 - Encoding files „on the fly” with Blowfish using Perl

Some time ago friend of mine asked me if I could write him an CGI script which encodes his backup file and allows to download it using HTTP protocol.

2011-04-09 - How to manage and disable bash history

You can change Bash history behaviour changing environment variables. Here is simple reference about this settings.

2011-01-09 - Quick dump or backup all databases in MySQL server

You can use this script mydump2many.sh. Here is source code:

2011-01-08 - Sending emails from Perl via SMTP server

Email inbox could be a good place to store many informations including logs from your services. Common usage of email may be sending notification about your service failures. Email systems are based on a store-and-forward model. Email servers accept, forward, deliver and store messages. So users don’t need be online simultaneously for exchange messages, online presence is only required for time that takes to send or receive messages. So when you send some message it will be delivered to recipient sooner or later.

2011-01-08 - Perl daemon: the hard way

From Wikipedia:

2011-02-01 - NWCHem on Ubuntu Linux

This article has been written as instruction for my friend how to run NWChem.