Quantcast
Channel: sleeplessbeastie's notes
Browsing all 770 articles
Browse latest View live

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 Article


How 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 Article


Image may be NSFW.
Clik here to view.

WordPress 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 Article

How 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 Article

Image may be NSFW.
Clik here to view.

April 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 Article


Keep 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 Article

Image may be NSFW.
Clik here to view.

CentOS 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 Article

How 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 Article


Image may be NSFW.
Clik here to view.

Console 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 Article


Image may be NSFW.
Clik here to view.

Ajenti – 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 Article

Brief 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 Article

CentOS 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 Article

Image may be NSFW.
Clik here to view.

How 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 Article


How 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 Article

How 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 Article


CentOS 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 Article

How 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 Article


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...

View Article

How 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 Article

Kolab 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
Browsing all 770 articles
Browse latest View live