py-gps-tools

After spending loosing time in vain trying to convert kml files containing the gx:Track format to gpx files for my gps and finally writing my own tool for doing that I realized I have done quite a lot of small scripts for gps data manipulation and decided to push them on github. I started with 2 and as I will clean the others I will push them also. # [](https://github.com/len-ro/py-gps-tools#py-gps-tools)py-gps-tools A set of python scripts to manipulate GPS data...

May 31, 2014 · 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

Replicated EhCache, the uneasy road

At first replicating EhCache seems a very easy task, just need to configure ehcache.xml with RMI and you are ready. Is it so? RMI At the beginning it seems so, the cache seems to be replicated, everything works. However at some point you notice in the log something like: Exception on replication of putNotification. Error unmarshaling return header; nested exception is: java.net.SocketTimeoutException: Read timed out. Continuing... java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: java....

February 6, 2014 · len

Database locking

This is a very simple example demonstrating a method to achieve a reliable lock in a cluster when the cluster shares a database connection. This example uses an Oracle database which has the following table/row: <pre lang="sql"> create table locked(shortname varchar2(100) primary key, info varchar2(100)); insert into locked values('TestLock', ''); commit; <pre lang="java"> package com.mccsoft.diapason.util; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class TestLock implements Runnable{ static final String JDBC_DRIVER = "oracle....

January 31, 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