:) bikulov.ORG Static notes about information technologies

Show N biggest directories in linux bash

du (disk usage) utility in linux bash summarizes disk usage of each directory or file. By default, it outputs only directories. Just enter some dir and type

$ du ./

Toggling string case in linux bash

It’s quite an academic task, but anyway useful sometimes. I’ve collected different ways to do it in terminal in linux. Some of them work with UTF-8 characters (some it will toggle case for “й”, “ё” and so on. It will not in general handle special ligatures, such as “ß”" and “fi”.)

Setting up RhodeCode on Ubuntu 12.04

This howto is based on a great guide with modifications. All settings are made for server domain hg.kenarius.org. You can replace it with your one easily.

AWK: a powerful tool for programmer

AWK is an acronym of first letters of its authors (Aho, Weinberger and Kernighan). It is a data-manipulating scripting language with huge possibilities. There are several implementations of it: awk is a canonical one, nawk (new awk), mawk (default in Ubuntu 12.04), gawk is GNU awk. I recommend latter one, because it works correct with unicode symbols in example:

$ echo юникод | gawk "{res = toupper(\$1); print res;}"
ЮНИКОД

Daily backups (files + mysql) to yandex.disk in Ubuntu 12.04

We all do backups. This note is about doing them on Ubuntu 12.04.

Tasks:

  • archive important folders
  • dump mysql databases
  • upload all to yandex.disk (online web storage with 10GB space)
  • delete old backups

I’ll save only backups for last five days.

Fixing missing icons in PCManFM

After moving to i3 I’ve installed PCManFM as GUI file manager. To fix missing icons one have to define icon theme. These instructions are tested on Ubuntu 12.04, but it must work with other distros.

Montage png into single one

Glue several png’s into one png [1]+[2]+[3]+[4] = [[1][2][3][4]] with montage from ImageMagick:

montage -geometry +1+1 -tile 4x1 image*.png final.png

Blender and Python molecules visualization

Blender is a free software for 3D graphics. In old virsions many operations were binded to hotkeys, so it was believed that Blender is very hard to master. Now it has more userfriendly interface with button in addition to hotkeys.