How to get number of days in a month using shell commands
Today I was writing a shell script that performs different actions depending on the day of the month. Nothing fancy but then I came across an interesting issue, which is how to get number of days in a...
View ArticleHow to easily access files over SSH protocol
I am constantly using SSH to transfer files between home notebook and remote servers. Basic scp tool is great but sometimes it is more convenient to mount remote file-system to easily access files over...
View ArticleWordPress as a personal scrapbook
Recently I read a blog post Use WordPress as an Evernote replacement and quickly caught the idea that it could finally solve my main problem as I try to store too much loosely related information and...
View ArticleHow to get the date of Easter using shell command
It is very easy task as it requires only the use of ncal command. Get the date of Easter for the current year: $ ncal -e March 31 2013 Get the date of Easter for the next year: ncal -e $(date --date...
View ArticleApril Fools’ Day – Google Treasure Maps
I should go to sleep but I can’t force myself to stop exploring the treasure map… Fire the cannons! Conquer the castle! It’s really interesting idea for April Fools’ Day. Watch YouTube video below to...
View ArticleKeep a pulse on the Address Resolution Protocol traffic
Today I will mention about arpwatch utility (developed by LBNL’s Network Research Group) as it is a small and very useful tool that will keep track of the Ethernet/IP address pairings and log every...
View ArticleCentOS netinstall – Mirror URL
Couple days ago I decided to use netinstall CD to install CentOS but got somewhat surprised by the “URL Setup” step as I didn’t expect to enter full URL containing installation image. URL for 32-bit...
View ArticleHow to read total CPU usage of the group of processes
I was wondering how to read total CPU usage of the group of processes. Then I came with very simple solution using just top and awk commands. At first look at the command below to grasp an idea: $...
View ArticleConsole based task manager
Recently I discovered console based task manager – devtodo. It is very useful tool as you can easily use it over SSH connection, create multiple different lists and combine them together. I will...
View ArticleAjenti – Clean and simple web-based administration tool
Recently I was searching for clean and simple web-based administration tool for a couple of small virtual servers so I decided to use Ajenti. It is simple and easily extendable...
View ArticleBrief note on the MySQL Master-Slave replication
What to do when you want to analyze data contained in database without overloading the server? The answer is simple as you can use MySQL Master-Slave replication to offload this task. I will describe...
View ArticleCentOS 6 – RepoForge and Advanced Policy Firewall
Hmm… Today I hit funny problem as I couldn’t install Advanced Policy Firewall from RepoForge (RPMforge) repository on CentOS 6. Fortunately the solution is trivial and doesn’t require any magic…...
View ArticleHow to relay selected mailboxes using ISPConfig 3
I hit an intriguing problem as I needed to relay selected mailboxes rather than the whole domain. I assume that you have already noticed that everything needs to happen on the same domain. It is rare...
View ArticleHow to change port forwardings during the SSH connection
Last year I wrote a short article about how to set up SSH port forwarding but I forgot to mention that you can quickly terminate existing port forwardings and create new ones during the SSH connection....
View ArticleHow to open manual page at the specific page section
After writing previous blog entry I started to think about how to specify page section when opening manual page. It is simple but quite interesting issue so I quickly got curious and wrote this post to...
View ArticleCentOS 6 – _netdev fstab option and netfs service
Yesterday I had a small problem. I have added GlusterFS mount point to the fstab but filesystem wasn’t mounted automatically after I rebooted the operating system (CentOS). GlusterFS fstab entry:...
View ArticleHow to display min and max values of the basic object types
Today as a small experiment I wrote very simple C program to display min and max values of the basic object types. limits.c/* Display min/max limits using limits.h header file */ #include...
View ArticleHow to convert date to Julian Day Number using shell script
I was wondering how to calculate Julian Day Number as I will need it to determine the sunrise and sunset times. Algorithms are extensively described so I will just point you to the two most useful...
View ArticleHow to determine the sunrise and sunset times
Couple days ago I mentioned about calculating the sunrise and sunset times. It is an interesting problem so after reading Astronomy Answers – Position of the Sun I quickly implemented it using C...
View ArticleKolab 3 and Debian Wheezy – Small LDAP issue and quick fix
Yesterday after Kolab 3 installation on Debian Wheezy I experienced strange problem as I couldn’t add an initial user account using admin interface. The very first thing to check if you are having this...
View Article