Categories
Uncategorized

How 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 pages – Julian day/Wikipedia and Julian Day Numbers/UT.

Categories
SysOps

How to open manual page at the specific page section

After writing the previous blog entry, I started to think about how to specify page section when opening the manual page. It is a simple but quite interesting issue, so I quickly got curious and wrote this post to describe a straight solution. Just to be clear – I need to mention that I am […]

Categories
SysOps

How to read total CPU usage of the group of processes

I was wondering how to read the total CPU usage of the group of processes. Then I came with a straightforward solution using top and awk commands.

Categories
SysOps

Simple shell script to backup selected directories

A couple of months ago, I published a short script to backup MySQL databases. Today I created a simple shell script to backup selected directories.

Categories
Uncategorized

Semi-intelligent screensaver

A couple of days ago, I described a couple of interesting ways to interact with KDE using the D-Bus message bus. Today I will show how to set up a semi-intelligent screensaver to just wait during YouTube video playback.

Categories
Uncategorized

How to automate KDE using D-Bus

Today I was playing with D-Bus message bus and KDE so I will describe here couple of basic actions that can be quickly automated by using shell commands. It shouldn’t matter much but I need to mention that I am using KDE 4.9.5.

Categories
DevOps

How to automate mouse and keyboard

Recently I was wondering if it would be possible to automate mouse and keyboard actions. The answer is obviously yes as you can use xautomation and xdotool tools. I will describe them in a couple of simple examples.

Categories
SysOps

How to automatically set up external monitor

Recently I was wondering how to automatically set up an external monitor without using desktop utilities as I don’t like to configure it each time. This question provided me a lot of fun as it opens a couple of interesting possibilities.