Friday, June 30, 2006

Brisbane in the morning

It is a little pleasure to be working away with such a nice view in the background. I am not sure it makes the code any better but it certainly is nice to glance at from the keyboard to refocus the eyes every so often.

Wednesday, June 28, 2006

LotusScript to restore removed QuickPlace

This is a LotusScript button that the QuickPlace SU administrator can run on a server to restore a QuickPlace that has been removed with QPTool. It goes through and changes all the titles of the place back to their original one before being marked as [Pending Deletion].

Dim s As notessession
Dim server As String
Dim placename As String
Sub Click(Source As Button)
Set s = New notessession

placename = "yourplacename"
server = "yourserver/projectlounge"

Print "Starting in main room"
Call restoredb(placename, "quickplace/"+placename+"/main.nsf")

End Sub

Sub restoredb(roomtitle, roompath)
Dim roomdb As NotesDatabase
Dim roomview As notesview

Set roomdb = s.GetDatabase(server, roompath)
If roomdb.IsOpen = False Then
Call roomdb.Open(server, roompath)
End If
roomdb.Title = roomtitle
Print "Set title: " + roomtitle

Set roomview = roomdb.GetView("System\Subrooms")
Dim doc As NotesDocument
Set doc = roomview.GetFirstDocument
While Not (doc Is Nothing)
Dim iroomtitle As String
Dim iroomfile As String

iroomtitle = doc.GetItemValue("h_Name")(0)
iroomfile = doc.GetItemValue("h_LocDbName")(0)

Print "Working on: " + iroomfile
Call restoredb(iroomtitle, "quickplace/"+placename+"/" + iroomfile)

Set doc = roomview.GetNextDocument(doc)
End Sub

Sunday, June 25, 2006

RoR authentication with IBM Notes/Domino

This is a very simple authentication system for a Ruby on Rails server in the same internet domain. It will allow you to get back the username of the person hitting your server provided they already have authenticated with an IBM Lotus/Domino or Websphere server that uses multi-server based session authentication.
IBM Domino/Websphere authentication works by placing an encrypted cookie for a given domain. There are a number of ways to find out what this cookie means.
For instance, you could either:
1. Decrypt the cookie using the secret key in the domino directory; or
2. Pass that cookie along to a live domino server and get back the username.
In this example, we are going to use the second option. This means we take that cookie and then pass it to an IBM server to check the authentication.
The cookie is stored in as LTPA token. Here is the ruby on rails code:

require 'open-uri'

module DominoAuthenication

# accesses the current user from the session.
# overwrite this to set how the current user is retrieved from the session.
# To store just the whole user model in the session:
# def current_user
# session[:user]
# end
def current_user
if session[:user]
@current_user ||= session[:user]
tokenstring = "LtpaToken="
tokenstring = tokenstring + cookies[:LtpaToken] if cookies[:LtpaToken]
OpenURI.open_uri('http://[your domino server here]/[your database]/[some page that returns the username]',
"Cookie" => tokenstring) do |http|
@current_user =

On the domino side, you just need to create a database and then a page within the database that has a field returning @username().
This will then return the full username. If you are using QuickPlace for instance, you will get back something like "CN=user/OU=placename/OU=QP/O=certifier" and you can deal with this as you like in your ruby code.

Wednesday, June 14, 2006

Ruby Skype Bot

Here is a very simple Ruby Script that will reply to anything anyone says to you.

require 'win32ole'

oSkype ='SKYPEAPI.Access')
puts "Version: #{oSkype.Version}"

puts "Getting events"
ev =, '_IAccessEvents')

ev.on_event('ChatMessageReceived') do |msg|
to = msg.MessageFrom.Handle
puts "#{to} said: #{msg.Body}"
if to != oSkype.CurrentUserHandle
response = "OMG, I can't believe you just said '#{msg.Body}'"
oSkype.SendMessage(to, response)

# infinite loop to keep the script alive
loop do

It requires the Skype ActiveS dll to be registered. The ActiveS site does not have the dll in the latest MSI so, I was able to download it here and make it available for people to register.

Monday, June 12, 2006

Being stalked by click torrent girls

In the past few weeks, I have been in Dublin Ireland, Cork Ireland, London UK, Bad Homburg Germany, Dubai UAE, Sydney Australia and Brisbane Australia and have connected to a torrent web site in each location to catch up on my shows.
I know it is probably not the best way to get TV shows, as is shown by the quality of advertisers that support their site. However, click torrent has to take the cake here.
In each of these location, it has show the exact same girls as "in my area" that want to meet me. Same photo, same clothes, same girls - just the names and locations change. If I didn't know better, I would have thought these women are traveling around the world stalking me under different aliases. For instance, in Germany, they had German names and were staying in the same place "Bad Homburg" - a small town near Frankfurt that has one main shopping street and not much going on (sorry but the toscana pizza place is very nice mind you).
However, how dishonest can this advertising get and how ignorant do they think the male population is? These girls are not in my area, are not wanting to meet me, and have nothing to do with the shows I am downloading. I am not the biggest fan of the google adwords but at least I am not getting totally lied to in a spam like manner.

Saturday, June 10, 2006

Ruby on Rails: Open source project collaboration

ProjectLounge Lite is a ruby on rails based project collaboration tool. It has calendars, tasks list (with Gantt view), document sharing and member management. There is a hosted version at and also the full source code is available for download and use under LGPL.

read more | digg story

Friday, June 09, 2006

ProjectLounge Lite released to open source

It has been a few months coming, but we have finally released all our code into the glory of LGPL open source. The open access SVN repository is open and available for anonymous read access. If anyone wants to contribute code, please contact me with what you want to add.
The svn URL is svn:// and I will be updating a project home page soon.
There is also going to be a simple one click install via the Instant Rails framework.
If all this code seems a little too much, you can see a hosted version at: to create your own project there. The access code is currently "pl124" but this will change to a captcha eventually.
The next few weeks will see a lot more development, so please if you are interested in contributing to an open source project that helps people get out of email and collaborate online about projects, please let me know.

Tuesday, June 06, 2006

Cool Tip to Beat Procrastination

A "life hack" tip for how to stop being a procrastinator. The basic idea is to just do the task for 10min to get over the procrastination urge. I will try this with my next task ... right after I read through my blogbridge :)

read more | digg story

Monday, June 05, 2006

Web 2.0 Has Corporate America Spinning

The array of new tools that foster online collaboration -- and could revolutionize business and we have a blog entry here about it read more | digg story

Friday, June 02, 2006

Projectlounge has a new blog

I will be contributing to that as well as this blog. This will still remain my random thoughts and travels. However, all thoughts related to online collaboration technology will start to be posted there. The Projectlounge online collaboration blog should be interesting to those of us who don't really like email and prefer to collaboration in a real system that was designed for it.