From monolithic single platform apps, to “write once, run everywhere”, (back) to … ?

‘A “line-of-business application” is one set of critical computer applications perceived as vital to running an enterprise’, as Wikipedia defines it. It might not always include cutting-edge technical innovation, but it involves a lot of functional knowledge on business processes thus becoming critical for the well-being of an enterprise and, as a result, has a very long life span. The first application of this type I have worked on was running on Sun machines (OMG, how old I am!...

October 27, 2015 · len

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

Trunc dates in postgresql to 10s

Ever needed to check if a date matches another within a certain range? If you need to trim to hours, minutes or seconds the date_trunc function in postgres does the job just fine. How about if you need to trunc to 10s? The following function should be of assistance: <pre lang="sql">create function date_trunc_x(timestamp with time zone, numeric) returns text AS $$ select substring(extract('hour' from $1)||':'||extract('minute' from $1)||':'||(extract('second' from $1)::int/$2) from 0 for 8) $$ LANGUAGE SQL; In can be used as in the following example:...

October 21, 2013 · len

Checking badblocks in soft raid setup

Use case 2 hdd in raid 1 using md, smartd signals: Device: /dev/sda [SAT], 8 Currently unreadable (pending) sectors Actions 1. Run smartctl on each disk, wait and check the results smartctl -t long /dev/sda smartctl -t long /dev/sdb #wait a looong time smartctl -l selftest /dev/sda smartctl -l selftest /dev/sdb sdb is ok but sda confirms the smartd error: # 2 Extended offline Completed: read failure 60% 4832 2519297024 2....

January 22, 2013 · len

Checking badblocks with smartmontools

… and some other observations. Warning: use at your own risk! I used to keep some of my photo backups on an external Seagate 500G drive which I also use for travel. Today however as I tried to access it I noticed some problems so I quickly ran: smartctl -t long /dev/sdb #followed by smartctl -l selftest #the result Extended offline Completed: <strong>read failure</strong> 90% 109 <strong>414996448</strong> I started using this useful guide to correct the problems by repeatedly running smartctl, calculating the offset, finding the file with debugfs, forcing reallocation with dd and so on....

January 2, 2013 · len

Frame sketcher, the model

If someone had asked me some time ago about bicycle frame geometry I would have answer simply in terms of 19”, 20” for MTB or 56, 58 for a road bike. I was of course aware of basic measurements such as Top Tube length or Standover Height and have passed a few times my measurements through a fit calculator but I haven’t given much thought from a geometric, or trigonometric to be more precise, point of view....

November 18, 2012 · len

Frame sketcher, introduction

I am searching for a new bicycle. Partly as a gift to one self, partly to make sure if the current one fails I will not be under pressure to buy one fast. As such I have done a lot of research into the subject. One of the elements I have found is that I could achieve a better price/quality ration buying online especially from German based online shops. This poses a big problem on testing since frame geometry differs a lot from manufacturer to manufacturer....

November 13, 2012 · len

Xubuntu 12.04

There is nothing much to say about Xubuntu 12.04 and this is a very good point. I’ve followed the previous article and everything seemed to work perfectly. Good job. Comments: raluca - Jun 5, 2012 Ubuntu is a super OS i love it…

May 11, 2012 · len