rblog

Ripping our cd collection

Two weeks ago we bought an Apple TV so now I have to start the work of ripping our entire cd collection. Have spent some time figuring out the best way to do it, which software to use and most important of all, which format to rip to. The Apple Tv is as any product from Apple superb when it comes to iTunes integration. But, and that was a huge but for me, you are then bound to any file format Steve Jobs decides are ok. So to h#$” with iTunes and Apple formats. I went for the lossless format flac, Free Lossless Audio Codec, because then I can do pretty much whatever I want afterwards, keep it and use only flac, or even transcode it all to mp3, mp4 or whatever iTunes support and import it to the iTunes-library.

Anyhow, after doing some heavy Googling for a few days here is my software stack of choice: Using Max to rip the cd’s to flac. One thing that I realized was a little drawback of choosing Max is that is uses MusicBraninz to lookup information abut the cd’s. Since we have quite a lot of Norwegian music, considered rare when it comes to Musicbrainz I initially had to type in a lot of info. That was pretty annoying when I knew that iTunes could retrieve the info from Gracenote. But then I found this apple script created by the same guy behind Max, which grabs the cd-info from iTunes and updates Max with it…cool stuff, which saves me A LOT of work!! Just not enable Max to automatically encode cd’s when inserted, first make sure that all info is present, then encode. Or else you will get a folder structure like this “Unknown artist / Unknown album / 01 Unknown trac.flac” which is kinda messy.

I also bought a 2TB external harddrive, formated it to FAT32, since I did not want to bother to install any NTFS drivers on our MacBook (found a forum post which said it had messed up that guys MacBook). Since I’m not going to save any > 4GB files on the disk, FAT32 is the weapon of choice since it is the file system supported by most operating systems. (Mac OS can only read from NTFS out of the box right now, not write to it, blame Bill Gates for that!!!)

GIMP with non locale menus

Must admit that I do not find translating everything into Norwegian a good thing, for instance I have Gimp installed on our MacBook. Since I’m not a hardcore photo editing kinda guy I need help from online tutorials to even do the simplest things. But that is almost impossible when you have menus in Norwegian and all tutorials are referring to menus and such in English. So I had to do a bit of surfing on Google, and luckily I found http://hints.macworld.com/article.php?story=20070423133918443.

More simply, I dug into The Gimp’s package, and moved the locale folder (found in Contents » Resources » share). I created a new folder, at the same level as Resources, named Resources Disabled, and dragged locale into that folder. This way, I can get the other languages back if I need them. The application now is running smoothly, in English. And one icon in the Dock is enough for either launch or launch via drag-n-drop.

Facebook Tracks and Traces Everyone: Like This!

Read this article digi…/slik-sporer-facebook-alle about how Facebook keeps track of your websurfing, even if you are not a member of Facebook at all. The article is based upon this paper Facebook Tracks and Traces Everyone: Like This!.

Numerous websites have implemented the Facebook Like button to let Facebook members share their interests, therewith promoting websites or news items. It is, thus, an important business tool for content providers. However, this article shows that the tool is also used to place cookies on the user’s computer, regardless whether a user actually uses the button when visiting a website. As an alternative business model this allows Facebook to track and trace users and to process their data. It appears that non-Facebook members can also be traced via the Like button…..

It clearly raises some issues, realizing that the best way to avoid being tracked by Facebook is to keep a separate browser only for checking your Facebook account, where you also deletes all cookies everytime you shut it down. If I bother I would then use on my corporate laptop IE for corporate websites (it is the default browser with much autologin enabled), then Firefox for normal surfing, and at last Chrome for Facebook. It will keep me anonymous when it comes to Facebook, they will still be able to keep track of me, but by deleting the cookies each time and only surf on Facebook, the data will be quite irrelevant.

Changing XML attributes using Python

Doing some work trying to update J2C resources defined in WebSphere using Rational Automation Framework, actually about the same thing as described in the article “A step-by-step guide to automating the deployment of a data source by using Rational Build Forge” and I needed to do some changes in jaas.xml. Won’t go into the details why editing XML using for instance “normal” Perl is hard, but I ended up using Python and ElementTree to edit the file with a structure like this

<jaas>
	<JAASAuthData 
		alias="dmgr/databaseuser" 
		description="The database user" 
		password="thepassword" 
		userId="dbid">
	</JAASAuthData>
</jaas>

Used plenty of sources to help me out, but I do think I did use http://effbot.org/ the most – super when it comes to figuring out Python, but http://www.rexx.com/~dkuhlman/pyxmlfaq.html was also of great help!

The script I created is available here updateJaas.py The script is bound to changing jaas.xml-files, but it should be quite easy to change it for other needs as well.

How to compare files? Notepad++ to the rescue

Have been using Notepad++ for quite a while now, but have not dived into the various plugins to much yet. But today I needed to compare two files and had no available comparators, or…could have used Rational Application Developer – but that is overkill for comparing two Jython scripts. But then Notepadd++ plugins to the rescue. Found this blogpost http://www.cottonrohrscheib.com/blog/notepad-compare-plugin/, downloaded the plugin and followed this simple how-to installing it. Up and running in less than five minutes!

How to undelete files in subversion

I accidentally deleted a bunch of directories using “svn delete” about a month ago, and now we realized that we needed them. So, question was – how to do undelete in Subversion since svn does not have a undelete-command. Then ‘svn copy -r REVISON’ to the rescue. First attempt solution found at jappler.com

svn copy -r NUMBER NAMEOFDIRECTORY NAMEOFDIRECTORY

The above command resulted in “NAMEOFDIRECTORY not a working copy”…damn!!! But then I found a slightly different way of doing it at www.canfield.com and I did

svn copy -r NUMBER https://{URL}/NAMEOFDIRECTORY NAMEOFDIRECTORY

Success…and if you are unsure of your svn url, just type ‘svn info’

Then to commit a list of folders in one operation I found the solution at Stackoverlow.com

cat mblade_list.txt | xargs svn commit -m “Restored”

Up yours fuc#”#$ spammers!!!

The past few weeks there has been a boost in comment spamming in my blog. Quite annoying when I have to delete 5 to 10 spam comments each day. So I decided to disable comments on old posts, but it was not as straight forward as I wanted. It is possible to disable pr. post, but with 10 years of blogging doing it manually is no option. But luckily I found this SQL statement

UPDATE evo_items__item SE T post_comment_status = "closed" WHERE NOW() > DATE_ADD(post_datecreated, INTERVAL 10 DAY)  

Solution found on the B2Evolution forum. Must admit that even though it is a one liner, it goes way above my head 🙂

What if your WebSphere application server won’t start?

There might be several reasons for that, most of them revealing themselves by information in the startServer.log. But earlier today when trying to start the deployment manager it just would not start, saying that I had to look into the startServer.log, but even if I tried several times no new info was to be found. “ps -ef | grep java” revealed no WebSphere processes running, so still no clues. So I gave up and wanted to create a PMR, thus needing to zip the logs-folder, but that process failed. So then I ended up issuing a df-command, realizing that due to some previous heap dumps there was no more disk space left, which caused the dmgr not being able to start. Cleared the disk and voila, back on track.

Then later I got a problem when applications would not install, the error message was

WASX7114E: Cannot create temporary file in directory “null”

Found this technote http://www-01.ibm.com/support/docview.wss?uid=swg21300016 which mentions the same message, but the solution is simpler than in this case. In fact the /tmp-folder was full with dump-files as well. So when cleaned up, application installation worked as a charm again.

Last week in Düsseldorf

Last week I attended the IBM WebSphere Technical Conference in Düsseldorf, Germany. As always a good event when it comes to the stuff I’m working with, and also good for networking.

Some pictures – first two from the airport train to Gardermoen

The first hotel room I got, missing something important…the bed

At Saturn trying 3D-TV. A bit cool, but if you ask me “Do you want it?” the question is no, just look how stupid the glasses are 🙂

Monday evening at Brauerei Schumacher trying the Schumacher Alt-beer

Traditional German food

Out walking next to the Rhein river

Sorting in Perl

I have had it with a menu in Build Forge – could not understand why the elements where not alphabetically sorted even though the Perl script generating the menu had a line like this

sort( @entries );

So Google to the rescue, I found this article about Perl Sorting Techniques http://www.perlfect.com/articles/sorting.shtml and just had to change the line of code to

@entries = sort { $a cmp $b } @entries;

Problem solved!