Create timelapse movie from shaked photos

The problem consist of creating a timelapse made of photos which have been taken with a camera which has been removed and attached to a tripod during a few months thus creating a lot of shaking. Solution, use hugin to align photos: <pre lang="bash"> #!/bin/bash align_image_stack -v -a$1 -s 2 *.jpg mkdir base for i in $(find . -maxdepth 1 -name "*.tif"); do n=".$(echo $i | cut -f2 -d".").jpg"; convert $i $n && mv $n base; done rm *....

July 5, 2015 · len

Resize a kvm disk image

1. From the vm, stop the vm: poweroff 2. From the host, resize the disk image: qemu-img resize /virt/disk02.img +50G 3. From the host edit partition table parted /virt/disk02.img GNU Parted 2.3 Using /virt/disk02.img Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print free Model: (file) Disk /virt/disk02.img: 107GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 16....

April 29, 2015 · len

Create a database of exif data

Create a database of exif data from photos using pyexiv2 and save it in a sqlite database for futher query: <pre lang="python"> #!/usr/bin/env python import os, sys, pyexiv2, sqlite3 thumbFormats = ('JPG', 'JPEG') rawFormats = ('ARW', 'CR2') formats = thumbFormats + rawFormats tags = ['Exif.Image.LensInfo'] dbFile = 'metadata.db' conn = None cursor = None def parse(dir): cnt = 0 for root, dirs, files in os.walk(dir, topdown=False, followlinks=True): refFiles = map(str.upper, files) for file in files: fullPath = os....

January 18, 2015 · len

(X)Ubuntu microphone mute/unmute script

The goal of this script was to have a simple script, binded with a shortcut which allows to mute/unmute all the microphones and to display a nice notification in the process. This is the simplest version working on xubuntu 14.04 with pulseaudio. <pre lang="bash">#!/bin/bash ACTION=1 #1 mute, 0 unmute SCNT=$(pacmd list-sources | grep muted | wc -l) MUTED=$(pacmd list-sources | grep muted | grep yes) if [ $? == 0 ]; then ACTION=0 notify-send -i microphone-sensitivity-medium "Microphone" "Unmutting $SCNT sources....

May 29, 2014 · len

xubuntu 14.04 – Trusty Tahr

There is not much to say about the new xubuntu 14.04 trusty tahr and this is a very very good thing. I had quite some work to do when installing 12.04 on my Tuxedo Laptop but with 14.04 I managed to setup almost everything in 2h on a friday night. Here is a list of just a few small hick-ups: non blocking grub error while booting from my LVM root Error: diskfilter writes are not supported....

May 2, 2014 · len

Oracle 11g release 2 XE on Ubuntu 14.04

There are many, many links, threads, bugs and discussions related to this since oracle 11g installation is no longer breeze at it was the case with oracle 10g, at least on Ubuntu. This is my short, minimal list of things to do to have oracle running on Ubuntu 14.04 12.04. Last updated 2014-05-01, install on 14.04 Last updated 2013-12-25, install on 12.04.3. 0. backup. If you have a previous oracle install backup your databases with expdp....

May 2, 2014 · len

CD backup

Since my last laptop with a working CD drive is dying this a simple script which does the following ops once the CD is inserted and auto-mounter: finds the mount point copies the files ejects the CD <pre lang="bash">cd "$(cat /proc/mounts | grep iso9660 | cut -d' ' -f2 | sed -e 's#\\040# #g')" && cp * /media/backup/data/ && cd && eject /dev/sr0

March 7, 2014 · len

Multicast pitfalls

Multicast might seem like a great idea for 2 problems: iptv and discovery. In my case it seemed like a very good idea for cluster node auto-discovery: no need to configure each node with all the other nodes, no need to know the number of nodes beforehand, use a single node configuration. However it seems that more and more nodes are discovered you can fall into some very dark pitfalls which could eat days and nights of your time until either you find a solution, either you revert to tcp or udp unicast....

February 9, 2014 · len

Old laptop, broken charger, limited frequency

I have an old laptop with a broken charger. The laptop works on the charger but it does not charges the battery. This should not be a problem since the battery is broken also. However I’ve noticed the laptop is very slow. After further investigation I noticed that the cpu maxfreq is always equal the the low frequency no matter the governor: cat cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq I installed cpufreq and tried setting the governor to performance, no luck....

January 2, 2014 · len

My new laptop is a … Tuxedo

There is a cabinet in my workplace which contains 5 Dell laptops. Now there will be a 6th and probably last Dell laptop going to that cabinet since my new laptop is not a Dell anymore. And this is not for lack of trying. And I’ve tried also Acer, Asus, Lenovo, even Toshiba. This was part of the now standard 3 year cycle of laptop renewal: make a list of requirements, search for a few weeks, get mad, search again, compromise, buy a laptop....

December 25, 2013 · len