Perl: Calculate the md5 sum of a file

This code sample shows how one could compute the md5sum of a file using Perl's Digest::MD5 module.

read more

How-To: Customizing SSH client

SSH is great. There is so many thing you can do with it other than just a remote secure shell like X forwarding, port forwarding, authenticate using a private/public key, compress the transmitted stream....

If you have different account that you use on an every day basis, it becomes quickly cumbersome to type those lengthly command lines.

One could work around this by using aliases, the right way would be to use ~/.ssh/config

This tutorial will show some customization examples that should cover most ssh use cases.

Perl: checking if a value is a float

While some languages offer an is_float function, Perl seems to only rely on regex.
This tutorial will show how to find if a variable contains an integer or not.
read more

Perl: checking if a value is an integer

While some languages offer a isint function, I could not find it in perl.
This tutorial will show how to find if a variable contains an integer or not.

read more

Python: Conditional expression or C ternary select

Conditional expressions in python does not have the same syntax than in C.
Python uses the and and or statements instead of the a ? b : c .

This code sample shows how to get the same result in python.

read more

Perl: Finding the last word of a string

This code sample will show how to find the last word in a string. A word being composed of letters and numbers only.

read more

Perl: Looping through an array

How to go through each elements of an array.
read more

Python: Iterating through an array

Iterating over an the elements of an array is pretty easy to do in python with the use of a for loop.
This tutorial will explain how to iterate through an array in python through a short script.
read more

OpenSSH SFTP chroot() with ChrootDirectory

The upcoming version of OpenSSH (<tt>4.8p1</tt> for the GNU/Linux port) features a new configuration option : <tt>ChrootDirectory</tt>. This has been made possible by a new SFTP subsystem statically linked to <tt>sshd</tt>.

How To: fixing Evolution after home directory changed (Failed to append to mbox)

Lately, I change my main user's username and homedir location. As a result, some application like evolution were kindda broken.

This tutorial will explain how to change some of evolution settings manually in order to fix any issues left from the name change.

read more

Syndicate content