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

Let’s decrypt

AES encrypt in java and decrypt in java, flex, python, C#. Encrypt: java <pre lang="java">public static void encrypt(InputStream is, OutputStream out, String secret) throws Exception { SecretKey secretKey = new SecretKeySpec(Hex.decodeHex(secret.toCharArray()), "AES"); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, secretKey); out.write(cipher.getParameters().getParameterSpec(IvParameterSpec.class).getIV()); CipherOutputStream cipherOutputStream = new CipherOutputStream(out, cipher); int bufLength = KEY_LENGTH/8 * 100; byte buf[] = new byte[bufLength]; int bytesRead = 0; while((bytesRead = is.read(buf)) != -1 ) { cipherOutputStream.write(buf, 0, bytesRead); } cipherOutputStream....

December 20, 2013 · len

A few notes about external hdd encryption

When storing your backups on an external drive you occasionally take with you it is a very good idea to encrypt your backups. Here are some personal conclusions after trying 2 different solutions. eCryptFs Advantages (reasons to choose): stacked – can be used on top of another filesystem, even on top of NTFS allocated on the fly – no need to pre-allocate your space, it will be allocated on the fly....

December 7, 2013 · len