Author Archive

command-line currency converter

November 19, 2014 Leave a comment

Qalculate! is a multi-purpose desktop calculator for GNU/Linux (now ported to Mac). It is small and simple to use but with much power and versatility underneath. Features include customizable functions, units, arbitrary precision, plotting, and a user-friendly interface (KDE or GTK+).” (source)

The software has a command-line interface too that you can start with the command “qalc“. You can do all kinds of fancy math calculations with it, but this time I’m interested in currency conversions. Qalc supports it too:

$ qalc
You need the download exchange rates to be able to convert between different currencies.
You can later get current exchange rates with the "exchange rates" command.
Do you want to fetch exchange rates now from the Internet (default yes)? yes
> 50000 USD to HUF

  50000 * dollar = approx. HUF 12157958

>  USD to HUF

  dollar = approx. HUF 243.15915



colorize man pages

November 19, 2014 Leave a comment



But how?

sudo apt-get install most

Then add this line to your ~/.bashrc:

export PAGER=most

Open a new terminal and try it.

This tip is from here. As the user cannedprimates states, “you can solve this issue by using a different pager, for example most. man will actually use the program specified in the PAGER environment variable.”

Categories: bash Tags: , , , ,

autocompile LaTeX project when a file changes

November 19, 2014 Leave a comment

When I work with LaTeX, I always create a script called “” that compiles the project and produces a PDF. For viewing the PDF file I use okular since it refreshes automatically if the PDF changes. However, if I change the LaTeX source, I need to call the “” script manually. Could it be automated? That is, when I save the LaTeX source, the project should compile automatically, so I should only switch between my text editor and the PDF viewer.

I found a complete solution for the problem: It’s a demo script that is part of the pyinotify project.


./ . .tex,.bib ./

I put in the root folder of the LaTeX project, next to the script. The command above means the following: “monitor the current directory recursively. When a .tex or .bib file changes, call the script.”


Categories: python Tags: , , , ,

Learn a language in a few minutes

November 16, 2014 Leave a comment

Short summaries of different programming languages: .

Midnight Commander: go to parent directory with Backspace

November 16, 2014 Leave a comment

Total Commander has a nice feature: if you press Backspace, it steps back to the parent directory. How to have this shortcut in Midnight Commander?

This thing has bugged me for years! But, I was lazy to look it up. Today I got fed up and made a Google search. Guess what. I had the answer in 5 minutes…

The local config files of MC are here: ~/.config/mc. The global ones are located at /etc/mc. I like to access the local config files at ~/.mc, so first I create a symbolic link:

$ cd
$ ln -s ~/.config/mc .mc
$ cd .mc
$ cp /etc/mc/mc.keymap .
$ vi mc.keymap

Modify this line:

# new value:
CdParentSmart = backspace

Originally this line was put in comment.

Restart MC and enjoy the new feature. If you wrote something in the mini shell, you can still delete it with the Backspace. If the mini shell is empty, Backspace makes MC jump back to the parent directory.

My MC version is 4.8.13. You can verify yours with “mc -V“.

download tube videos

November 14, 2014 Leave a comment

They support a lot of tube sites.

Categories: Uncategorized Tags: ,

Get every new post delivered to your Inbox.

Join 73 other followers