Alone at home today, was watching “Two and a half men” when I decided during a commercial break to switch to “The Big Bang Theory“. There was a scene where one of the characters yelled out in a bar that his picture would be in Peoples Magazine, when Charlie Sheen turned around saying something like “Until you are on the front page it does not matter”… I took that as a sign and switched back to Two and a Half Men, feeling sorry for having left them in the first place…
rblog
Johan Theorin – “Nattefokk”
My latest book, this time not a documentary but a crime fiction, the story takes place at the Swedish island Öland. Easy to read, mixing ghosts, thieves, police and more.
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!
Magnetic resonance scan
Today I tried Magnetic resonance scan for the first time (and hopefully my last). It was not that bad experience, I guess because I do not suffer from claustrophobia and also because I could wear ear protections. I was there to get a picture of my shoulder, and in a few days I will hopefully just get confirmed that my muscles are ok and I can start lifting without any fear of creating more damage to my arm.
Worst thing was that I had to remove my nipple piercing, but after having watched this video http://www.metacafe.com/watch/2194395/mri_scan_accident/ I realized that it was a good thing to remove it…and I know that both Elin and my mother appreciate that it is gone…
Ragnar Hovland – “1964”
My latest book, recommended by Elin, Ragnar Hovland “1964”. Easy to read, and good entertainment.
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”
Anders Frankson og Niklas Zetterling “Slaget om Kursk”
The story about the battle of Kursk. Quite interesting book, off course a lot of name of various places and a lot of numbers making it a bit hard to hang in there, but also much focus on how the life of a solider was from day to day. Enjoyed the focus on the differences in leadership between the allied, here represented by the Russians, and the axis. Where the Russians focused on leadership from above, the Germans let soldiers on all levels decide during the battle, making the German army way more effective. They did not have to wait on orders from above when deciding what to do on the battlefield. Such things make the book worth reading, but still, you have to be interested in WW2 to really enjoy the book.
Planning to buy a new bike?
Then you have several options, you could choose to go for the safe, conservative and very common alternative – bikes that has bike chains.
But if you want to be more innovative, maybe want to prove that you are an early adopter in the urban market (ha-ha), you could go for the Trek District Bike. It uses a belt instead of a chain, in fact it might be a good alternative for my single speed. I have already had to replace two chains this year, and I give the one mounted on it right now just another month before that one must be replaced as well.
But you can be even more innovative, take a look at the Stringbike. That is for sure innovation! But it looks a bit complicated I must admit.
[video:youtube:z4PAzalfpww]Trøndersk Chargé d’affaires Oslo
Today I was out with Anders, we had been at Teknisk Museum, which by the way surprised me bigtime being a paradise also for a boy only two and a half year. On our way home waiting for the bus the stop after Kjelsås, we had been at Shell buying some buns, I noticed a sign on the house just next to the bus stop. “Trøndersk Chargé d’affaires Oslo” and also showing the time both in Trondheim and New York.




