Friday, February 13, 2015

Wednesday, December 24, 2014

irfanview: rename file names in batch processing

Renaming camera photos in

terminator: windows size and position

Example of a confing file: ~/.config/terminator/config

    use_system_font = False
    font = Monospace 12
    background_image = None
      profile = default
      type = Terminal
      parent = window0
      type = Window
      parent = ""
      position = 1110:1043
      size = 1300, 450 


Wednesday, November 05, 2014

Ubuntu: pdf to images and images to pdf

pdftoppm -png a_pdf_file.pdf img
convert *.png a_pdf_file_as_img.pdf

Tuesday, November 04, 2014

Git pretty tree alias

git config --global alias.tree "log --graph --full-history --all --color --pretty=format:\"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s\""

Tuesday, September 23, 2014

rename with grouping

rename "s/(\d\d)/0\$1/" 28/ The code will rename folder named "28" into "028".

Thursday, September 04, 2014

Firefox OS MultiROM build from 4th September 2014 for Nexus 5

Following this guide, I built the current (4th September 2014) Firefox OS from git repositories for Nexus 5 for MultiROM.  The guide explains how to build it, make MultiROM and how to install it on Nexus 5. The problem is that it contains build rom from June 2014. So I decided to build the current one from September 2014

I don't assume any responsibility for damage caused to your device or lost data.

The rom for MultiRom can be downloaded from here.

Monday, August 04, 2014

ImageMagick: resize images to specific width or hight

For example to resize tif images to width of 512 pixels:mogrify -resize 512 *.tif
Whereas to resize tif images to height of 512 pixels:mogrify -resize x512 *.tif

Tuesday, July 29, 2014

Git: Show updated tree of branches in console

To do this, just add the following to ~/.gitconfig[alias]
  tree = log --graph --all --decorate --pretty=oneline --abbrev-commit
Then git tree will give text based tree of branches:

To run git tree in console showing e.g. 20 latest commits we can run git tree in a while loop as follows: while true; do clear; git tree -20; sleep 2; done

Wednesday, July 23, 2014

Gnome 3.12: Add VirtualBox machine to gnome's activities and dash

Specific virtual machines can be launched directly from gnome activities or gnome dash without the need to start standard Virtual Box GUI. For this we need to create desktop files and place them in our local applications folder, i.e., /.local/share/applications.
Example of a desktop file starting virtual machine called w7 is as follows (file name w7.desktop) These files can be created manually, but also using Virtual Box GUI. Once we have these files, it is enough just to copy them into /.local/share/applications and they will be e immediately available in the gnomes activities. From the we can just drop and drag them to dash.
If we want to create them manually, we can use the example from the above. The ids of the virtual machines can be obtained using the following vboxmanage list vms
"w7" {25e911a6-7bae-422a-84c2-30ced68d701d}