Friday, November 17, 2006

How to compile NotesAPI programs without buying visual studio on Windows XP

Download and install:
1. Microsoft Visual C++ Express (GUI not needed to compile)
http://msdn.microsoft.com/vstudio/express/visualc/
2. Run Windows Update if needed

3. Microsoft Platform SDK for Windows Server 2003
http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en#filelist

4. Download and extract the Lotus C API Toolkit
http://www-128.ibm.com/developerworks/lotus/downloads/toolkits.html

5. Download the nmake program and copy this to your c++ bin directory
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q132084
(may already come with c++ express)

6. Create batch files that simplify your build (put these in a directory in your path)

FILE: mk.bat
CONTENTS:
nmake /f mswin32.mak /a

FILE: setenv.bat
CONTENTS:
"D:\Program Files\Microsoft Visual Studio 8\VC\vcvars32.bat"
"C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.bat"
set LIB=d:\notesapi\lib\mswin32;%LIB%
set INCLUDE=d:\notesapi\include;%INCLUDE%
set PATH=d:\lotus\domino;%PATH%

FILE: w32.bat
CONTENTS:
"D:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\SetEnv.Cmd" /RETAIL

7. To use the compiler
1. Start a Visual Studio 2005 Command Prompt
2. Run the commands:
a) setenv
b) w32
3. Change to the d:\notesapi\samples\basic\intro
4. run the batch file "mk"

...and you should then be able to compile NotesAPI programs.

Saturday, November 11, 2006

Paris in November

We arrived in Paris after 7 weeks in Geneva. It was memorial day here and we had a perfect view of the ceremony from the hotel. The TGV was the perfect way to travel and we missed the strikes that seem to happen each November. Here are some photos we posted...

Sunday, October 29, 2006

Leukerbad for the weekend

We just spent the weekend in the spa town of Leukerbad. It was a totally relaxing time and very easy by train/bus from Geneva. Here are the photos from our walk around the lake up at Gemmi.

Wednesday, October 25, 2006

Making the AIX shell more friendly

To make the standard korn shell more friendly, you can edit your .profile with the following settings:

set -o emacs

stty erase ^?

alias __A='^P"
alias __B='^N"
alias __C='^F"
alias __D='^B"


Note, to get control in vi ctrl-v (keep this down when typing the next character).

This will now give you the use of the up and down arror keys as well as the backspace key for editing commands. This much easier than using ctrl-h and all the standard keystrokes.

Tuesday, October 24, 2006

Changing a database replica id on AIX

There has been a utility floating around to change a Lotus Notes database's replica id for some time. I recently migrated a company to AIX 5.3 from another platform to run Domino 7.0.2. Here is a simple HOWTO get up and running to compile with the Notes API on AIX 5.3.

Upload the NotesApi tool kit from the Lotus Developer Domain (under toolkits).

Uncompress and extract the tar file to /yourmount/notesapi

Make sure the notes user owns these files and any links
chown –r notes:notes /yourmount/notesapi

Create a link under /opt/ibm/lotus

cd /opt/ibm/lotus
ln -s /yourmount/notesapi notesapi
chown notes:notes notesapi

Change to the notes user with their profile
su - notes

Create a script to set all the environment variables

server:/home/notes$ cat setenv
#!/usr/bin/ksh

LOTUS=/opt/ibm/lotus; export LOTUS
NOTES_DATA_DIR=/yourmount/domino/data; export NOTES_DATA_DIR
Notes_ExecDirectory=$LOTUS/notes/latest/ibmpow; export Notes_ExecDirectory
PATH=$PATH:$NOTES_DATA_DIR:$Notes_ExecDirectory; export PATH

Source the file before running any compilations

server:/home/notes$ . setenv

compile the intro sample as a test
cd /yourmount/notesapi/sample/basic/intro
make -f aix.mak

You can now compile any notesapi program.

The chrepid.c example is available for download here:
chrepid.c
chrepid make
chrepid compiled program

Thursday, September 07, 2006

Parked way too close


Almost hit the metal staircase with the front of the car.

Monday, September 04, 2006

First Surf Lesson



Although I was born in Hawaii, today was my first ever surf lesson and I really enjoyed it. Thanks to Learn to Surf Noosa.

Sunday, September 03, 2006

Fathers day 2006


Tack is wondering how much more seafood Anne will eat.

Saturday, September 02, 2006

Noosa



We are having a nice weekend away in Noosa. This was taken in Nooseville at the Noosa Pacific resort.

Monday, August 14, 2006

Retrospective Spam Filter

As a good spamcop user, I like to report all the spam that slips through the black lists and filters. That way, making sure the network admins know about any open relays they might have while building the black lists. However, a lot of spam comes through over night and I get a full inbox in the morning. When I report most of these, they have already been black listed. So, I thought it would be best to write a script that would check to see if these had already been listed and filter based on this. This way, even if the spam slipped through the black list on the first try, eventually it would be listed and filtered out of the inbox after the fact. This code seems to be working well for my inbox so I thought I should share it for all Lotus Notes and Ruby users:

require 'win32ole'
require 'socket'

@application = WIN32OLE.new('Notes.NotesSession')

def check_file(server, mail)
@database = @application.GetDatabase(server, mail)
@database.Open(server, mail) unless @database.IsOpen
@view = @database.GetView('($InBox)')


dnsbls = %w{bl.spamcop.net cbl.abuseat.org}

count = @view.TopLevelEntryCount
count.times do |index|
doc = @view.GetNthDocument(index+1)
spamdocs = []

doc.GetReceivedItemText.each do |t|
start = t.split(/[()]/)
start[1] =~ /(\d+).(\d+).(\d+).(\d+)/
dnsbls.each do |dnsbl|
begin
var = Socket.getaddrinfo "#$4.#$3.#$2.#$1.#{dnsbl}", 0
puts var[0][2]

if var[0][2] =~ /127.0/
puts "Access denied for #{start[1]} by #{dnsbl}"
spamdocs << doc
end
rescue
end
end
end

spamdocs.each do |doc|
doc.RemoveFromFolder("($InBox)")
doc.PutInFolder("($JunkMail)")
end

end
end


check_file('www/projectlounge',"mail/iconnor.nsf")

Saturday, August 12, 2006

Happy birthday and anniversary Dowds


We went out to Ecco for dinner with the Dowds to celebrate 38 year anniversary and Tack's birthday.
We all had a wonderful night and thanks to the staff at Ecco for making it such a pleasant night.

Saturday, July 22, 2006

Installing Ubuntu on a Dell PowerEdge without a CD drive

I recently purchased a very basic DELL in Australia. In the USA, it is impossible to buy a DELL server without a CD ROM and after buying a few there for various reasons, I did not think to ask when ordering the one on the phone. Well, let me assure you, no other CD drive I could get my hands on would actually work and the support staff at DELL were of no help. I even managed to get a DELL CD from a friends PC but it would not work in the server either - the server was just too fussy.
Before sending it back, I thought I would give it one last shot and purchased a 1GB USB key from a local computer dealer. Then downloaded a ubuntu ISO for a CD install. After a few trial and errors and searching on the internet, I think I have the actual instructions to get it working. Although, I am no linux kernel hacker, here goes:

1. Download the ISO that you want (in my case ubuntu 6.06 desktop)
2. Download the syslinux tool for windows (syslinux latest)
3. Optional USB format utility (from HP)
4. Copy the CD contents to your USB device
5. Unzip the syslinux and run it against your USB drive (syslinux.exe -f F:) from the win32 directory of syslinux
6. Copy these files to the root of the USB
  • vmlinuz (kernel binary) from "casper\vmlinuz"

  • initrd.gz (initial ramdisk image) from "casper\initrd.gz"

  • syslinux.cfg (SYSLINUX configuration file) rename and copy from "isolinux\isolinux.cfg"


7. Then edit the syslinux.cfg so that the vmlinux and initrd.gz now point to the root
e.g.

DEFAULT /casper/vmlinuz
GFXBOOT bootlogo
GFXBOOT-BACKGROUND 0xB6875A
APPEND boot=casper initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram
rw quiet splash --
....Becomes....
DEFAULT vmlinuz
GFXBOOT bootlogo
GFXBOOT-BACKGROUND 0xB6875A
APPEND boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram
rw quiet splash --

8. Eject the USB and you can now boot from it as soon as you go into the BIOS settings on the DELL server (F2 at boot) and set the boot order to allow the USB device to boot as a priority

Monday, July 10, 2006

Disposable email, spamcop and a trap

I will never be afraid to give out my email address again. Well, maybe not my actual address, but I will give away my sneakemail address. This service (http://sneakemail.com), will allow you to generate a random looking email address like "a9svgun0211@sneakemail.com" that you can safely give out. It is a disposable address that you can use to sign up for a given site, tag it for that purpose and then if you get any spam from that site, delete the address.
However, I have recently taken this one step further. I have created a spamtrap address that will automatically report spam to spamcop and blacklist the IP address of the hosting servers. So, instead of deleting the address, I simply re route it to the spam trap and increase the power of the blacklist.
Requires tools:
1. Sneakemail (free accounts available) Sneakemail
2. Spamcop reporting account SpamCop.net - Spam reporting for the masses
3. Automatic report account - the trap account (Thunderbird Reporter or Lotus Notes reporter )
Then you can use your disposable email addresses as you need and have them divert to the spam trap if they start to get spammed.

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)
Wend
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

public
# 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]
else
begin
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 = http.read.strip
end
#rescue
end
end
end
end

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 = WIN32OLE.new('SKYPEAPI.Access')
puts "Version: #{oSkype.Version}"
oSkype.Connect()

puts "Getting events"
ev = WIN32OLE_EVENT.new(oSkype, '_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)
end
end

# infinite loop to keep the script alive
loop do
WIN32OLE_EVENT.message_loop
end


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 http://www.projectlounge.com 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://svn.projectlounge.com/open/light 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: http://www.pllite.com/projects/new 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.

Wednesday, May 31, 2006

To MacBook Pro or not?

Two people I trust have just taken the dive into the MacBook Pro world. Sami Shalabi and Will Raabe. They have both promised updates on their thoughts and how much they use them. Will tends to love his toys and will test out all the latest gadets I am sure. Sami is more the hard core coder and if Sami likes it, I know it will be a very good development machine (fast compiles and eclipse j2ee friendly).
If both of these people still love it in a month, then it will be almost impossible for me to resist ditching my 2 month old Dell and getting one.

Tuesday, May 30, 2006

5 countries in a week

We have arrived in Australia now and hope to stay for a while. In the last week we have been in Bad Homburg Germany, Dublin & Cork Ireland, London UK and then Dubai UEA on the way to Sydney Australia. It will be good to be a little more settled and less "homeless" for the release of ProjectLounge Lite. We go to Brisbane this weekend and hope that will be the last of the flights for a while.
Having, just complained about flights, I was really impressed with Emirates for their service. Coming back to Australia did not really feel "proper" by not getting on Qantas. However, the combination fare from travelmood could not be beat on price. The economy sector from London to Dubia was only 6 hours and I did notice the extra 2 inches leg room over BA/QF. They even give out hot towels. However, when it came to the lounge in Dubai and the Business service to Sydney I was very impressed.
If they can keep up the prices, I am not sure I would fly anything else on long hauls to Australia. They even had an espresso machine on board to get me going before landing - they really thought of everything.

Wednesday, May 17, 2006

Reporting Spam to SpamCop from Lotus Notes

Here is a very simple agent to report a select email or emails to spamcop's quick reporting service. You will need a spamcop account and access to quick reporting.

It uses a new r6 feature of lotusscript to get the received header information so that spamcop will know exactly where the email came from at each hop. This is important as they use this for their black lists so that the correct servers are blocked while the innocent receiving servers are not.

It is also important to list your allowed hosts with spamcop so that if it routes through some of your servers then these will not be treated at open relays.

Sub Initialize
Dim s As New notessession
Dim dc As NotesDocumentCollection
Dim db As notesdatabase
Dim doc As notesdocument

Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments

Set doc = dc.GetFirstDocument


While Not(doc Is Nothing)

Dim text As String
text = ""
Forall t In doc.GetReceivedItemText
text = text + "Received: " + t + Chr(10)
End Forall
Forall it In doc.Items
If it.name <> "Received" Then
text = text + it.name + ": " + it.text + Chr (10)
End If
End Forall

Dim mail As notesdocument
Set mail = db.CreateDocument

mail.form = "memo"
mail.subject = "Spam to report"
mail.body = text

Call mail.Send(False, "spam@uce.gov")
Call mail.Send(False, "quick.[yoursecretkeyhere]@spam.spamcop.net")

'You can then save or just delete it here
doc.RemoveFromFolder("($junkmail)")
Call doc.Save(True, False)

Set doc = dc.GetNextDocument(doc)
Wend
End Sub

Like this article? Digg it!

Thursday, May 04, 2006

Rails acts_as_threaded Plugin

Left a comment on the acts_as_threaded plugin page as a warning to someone using it that wants to use proper ids for their tables.

If you end up using a guid for the table primary key and root_id, it you need to enclose the "#{self[root_column]}" with quotes. If you don't the sql will get broken by the hyphens in the id.

Otherwise, it works well even when you combine it with guid self generating 36 char ids.

Lines with root_column will change from something like this:

self.class.update_all( "#{left_col_name} = (#{left_col_name} + 2)", "#{scope_condition} AND #{root_column} = #{self[root_column]} AND #{left_col_name} >= #{right_bound}" )

to become something like this:

self.class.update_all( "#{left_col_name} = (#{left_col_name} + 2)", "#{scope_condition} AND #{root_column} = '#{self[root_column]}' AND #{left_col_name} >= #{right_bound}" )

Wednesday, April 26, 2006

People getting taller and seats getting smaller

I would like the executive at Airbus who thought of the idea of standing room only flights to fly economy to Australia from the USA or Europe before adding these seats. In fact, I challenge any airline executive who runs a service to Australia to fly this route in the small seats down the back.
I would like to see economy sleeper seats before economy standing seats. There must be a way to have bunk beds or the like that still allow you to have lots of people on the flight and not taking up too much room.
I am not against getting a lot of people onto the planes. In fact, that is the best idea. Flying is a really polluting business and if we can have more people on the flights, then this is better than more flights. However, it would be nice if there was a way to get some sleep when you are stuck on a 16 hour flight. Posted by Picasa

Sunday, April 23, 2006

gzip for your bedroom

I have been packing away some bedding using a vacuum bag system. I always thought these systems were a bit of a joke but they really work well on bedding and pillows (and we certainly have a lot of pillows). Anyway, I recommend a vacuum pack system for anyone who is moving. It really feels like gzip for your bedroom... now if only I could store these things on a sftp server somewhere while we move.

Wednesday, April 19, 2006

Geocodes are better than an address

After playing with google maps, I see now that the geocodes are far better than just an address. For instance, in the local TV station, many people find it hard to locate within the high school. However, with the proper geocodes GLatLng(42.4473, -71.3469) instead of the address one GLatLng(42.447601, -71.342077) it was possible to get the marker right at the door to the studio. Anyway, if you are finding it hard to find CCTV, then I hope you find the geocoded map at http://www.concordtv.org/site/index/directions useful in your search.

Thursday, March 30, 2006

Hunting down invalid signatures

I have spent the last few days trying to hunt down an archive problem in a notes mail file. In doing this, I wrote a small lotusscript button to verify signatures that I can share here.

This could be written in the C API. However, keeping it in a button makes it easy to email out to users for them to test.

Const MAXUSERNAME =256
Declare Function NSFNoteVerifySignature Lib "nnotes.dll" Alias "NSFNoteVerifySignature" ( Byval hNote As Long, Byval null1 As Long, Byval null2 As Long, Byval retSigner As String, Byval retCertifier As String) As Integer
Declare Function NSFNoteUnsign Lib "nnotes.dll" Alias "NSFNoteUnsign" ( Byval hNote As Long) As Integer
Const NOERROR = 0
Const PKG_NSF = 512
Const ERR_NOTE_NOT_SIGNED = PKG_NSF+89 'Document is not signed
Const ERR_NOTE_INVSIG2 = PKG_NSF+91 'Document has been modified or corrupted since signed! (data)

Sub Click(Source As Button)
Dim ses As New NotesSession, irc As Integer
Dim retSigner As String, retCertifier As String
Dim doc As notesdocument, vw As NotesView
Dim db As notesdatabase
Dim dc As notesdocumentcollection
Dim fileNum%
Dim i As Integer, count As Integer

Set vw = ses.currentdatabase.views(0)
Set db = ses.currentdatabase

fileNum% = Freefile
Open "c:\temp\signatures.txt" For Output As fileNum%


Set dc = db.GetProfileDocCollection()
Set doc = dc.GetFirstDocument
count = dc.Count
i = 1
Print "Check profile Notes: " &Cstr(count)
While Not doc Is Nothing
Call fix_signature(doc, fileNum, i, count)
i = i + 1
Set doc = dc.GetNextDocument(doc)
Wend

Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument
count = dc.Count
i = 1
Print "Check data Notes: " &Cstr(count)
While Not doc Is Nothing
Call fix_signature(doc, fileNum, i, count)
i = i + 1
Set doc = dc.GetNextDocument(doc)
Wend

Close fileNum%
End Sub

Sub fix_signature(doc As notesdocument, fileNum%, i, count)
Dim textline As String
retSigner = String$(MAXUSERNAME ,Chr(0))
retCertifier = String$(MAXUSERNAME ,Chr(0))

irc%= NSFNoteVerifySignature (doc.handle, 0, 0, retSigner, retCertifier)
Print Cstr(i) &"/" &Str(count)
If irc% = NOERROR Then
textline = "SIGNED: " &Cstr(doc.NoteID) &" " &Left(retSigner, Instr(retSigner,Chr(0))-1)
Write #fileNum%, textline
Elseif irc% = ERR_NOTE_NOT_SIGNED Then
textline = "NO SIGNATURE: " &Cstr(doc.NoteID)
Write #fileNum%, textline
Elseif irc% = ERR_NOTE_INVSIG2 Then
textline = "INVALID_SIGNATURE: " &Cstr(doc.NoteID)
irc% = NSFNoteUnsign(doc.handle)
If (irc% = NO_ERROR) Then
Call doc.Save(True, False)
textline = "REMOVED SIGNATURE: " &Cstr(doc.NoteID)
Else
textline = "COULD NOT REMOVE SIGNATURE: " &Cstr(doc.NoteID)
End If
Write #fileNum%, textline
Else
textline = "ERR: " &Cstr(irc%) &" " &Cstr(doc.NoteID)
Write #fileNum%, textline
End If
End Sub

Friday, March 17, 2006

Updated Full Text Wiki for Ruby on Rails

I have been playing with Ruby on Rails for a while now and started to use it with MySql's full text searching abilities.
I added some code to a search library on the Ruby on Rails wiki - hope it helps others in the space
see: http://wiki.rubyonrails.org/rails/pages/TextSearch

Tuesday, March 14, 2006

FastCGI failing on Fedora with Ruby on Rails

After battling with all the FAQ and wikis getting FastCGI to work with Apache, I found the last problem. FastCGI spawns temporary files in your /etc/httpd/log/fastcgi/dynamic directory (unless you override this in your http.conf file).

I was still getting these errors:

[Mon Mar 13 17:03:08 2006] [crit] (13)Permission denied: FastCGI: can't create (dynamic) server "/var/www/html/test.rails/public/dispatch.fcgi": bind() failed [/tmp/fastcgi/dynamic/a452aa13feeda365028a2d43d1b2ce13]

It turned out that my problem was SELinux getting in the way. It really locks down what the apache user can do (which is probably a really good thing). However, for fastcgi it was locked down a little too much. I intend to now fight a little with SELinux to see if I can get it to play nice.

If you want to temporarily disable it, you can run this command:

echo "0" >/selinux/enforce

you can echo a "1" to turn it back on.

Thursday, March 09, 2006

Looking forward to some Sun

We are in London now until the 21st when we go back to Concord and had a good week of rain and clouds. It is really amazing how a little bit of sun goes a long way in the winter. Coming from Brisbane, you really took the sun for granted where here and in Concord you notice it and try to make the most of it. All said, I could really use a few sunny days here in London and hope for the best.

Friday, February 24, 2006

Setting up BIND locally on XP

BIND looks to have very good install instructions at: http://www.zytrax.com/books/dns/ch5/win2k.html

but it seems like the "run as service" option has moved in XP. However, running locally on 127.0.0.1 address it did not seem to stop it if I ignore the errors that there are too many privileges. I would never do this in production, but then I would tend to run *nix there rather than XP.

I found the trick to be go to a command and run: C:\windows\system32\dns\bin\named-checkconf.exe

and check for any errors in your C:\windows\system32\dns\etc\named.conf (that you have create yourself compared with fedora that gives you a cache servers out of the box).

So, I can now dig rather than nslookup and us my own DNS server. I found different DSL providers seem to be really mean on caching their names and do not update them as fast as I would like.

dig @127.0.0.1 mazhire.com any

Thursday, February 23, 2006

Mazhire is ready for car hire rental orders

We have launched a new car hire rental website at: http://www.mazhire.com and there is city level content on each major city in the world. This includes cities such as Brisbane, Austrlaia to larger ones like London, UK.
Here we can bring our own content and ideas per city to help anyone planning to rent or hire a car. Now that the back end is all sorted out, there remains lots more work including JSON, widegets, xml editions and other exciting ways to hire cars online.

Thursday, February 09, 2006

I have added my bookmarks

I am now keeping a del.icio.us link roll in my blog so you can all see what sites I like. You might find my tagging interesting but it makes sense to me.

Wednesday, February 08, 2006

Is Ruby beyond Java?

I just bought the Ruby and Beyond Java book from Foyles in London. I have played with Ruby on Rails but after reading blogs I think a bit of reading is in order.
I cannot help but think scripting is not the answer here but I really miss what Notes/Domino provides in the web world. I like the idea of just creating a field once and getting Create, Read, Update, and Delete without too much work. Struts, Hibernate, JSP and Tomcat involve a lot of typing and it does take time. Maybe my issue is getting Notes like flexibility from a relational back end but I do want to think on this issue for a while and I suspect there is no easy answer here.

Sunday, February 05, 2006

Farewell and thanks for all the fruit

After a wonderful full 6+ years at IRIS and then IBM, I have decided to go out on my own. I will be starting with a week in London, UK where I just flew into - the superbowl is on but I guess I miss the million dollar commercials here.

Thanks to all my wonderful friends and workmates at Westford and beyond. I had a really nice last week and had a chance to talk to almost everyone and wish them well.

The new support site my team was working on will continue to change the IBM world for the better and Notes/Domino is going to continue to be the leader in groupware. I had a unique opportunity to see how truly professional software is written, tested and supported and learned and grew so much there.

The last project I worked on really drove home the importance of the Model View Controller (MVC) pattern. It is really important that complicated web applications or portal sites have a solid pattern in place from the start in order ensure quality code. I also learned that the View should be given to two different skill sets: user interface (UI) and development. It is probably possible to have the html and backend code generated by the same person but I expect this to be the exception rather than the rule.

I also really appreciated the UI team that can produce really clean compliant XHTML code. Having such a clean base to build on really makes all the difference when putting together complicated sites. I also learned just how important the UI team was in the development process and would encourage all UI teams that are working in the web space, to be able to provide XHTML rather than just photoshop or png files. If you cannot produce the HTML, then the chances are slim the development team will make a site that looks how you intended.

Thursday, January 26, 2006

Franchising legislation being debated in Congress

The Federal Communications Commission is seeking comment on this issue. Click Here. I am not sure what comments they want apart from it is a bad idea that was paid for by companies and not citizens. If only they would conduct some independant research rather than rely on what the lobby groups provide :(

Tuesday, January 24, 2006

Cash is king - not miles

I have to disagree with a recent WSJ article "When It Still Makes Sense
To Take the Miles
". I agree that their might be some point when it makes sense to use miles over cash back, but not based on the numbers they present.
I am not sure their "discounted" trans-atlantic flight is that discounted. The table gives an example of $900 as a discounted fare. I have personally never paid that much and am pretty picky when I fly. I like the morning flight out of Boston on BA so that I avoid the night flights that give you 3 hours sleep (maybe) and get you there at 5am in the morning.
Also, the example for a business class ticket from AA, at $6700 does not factor in two real points.
1. AA does not really have a proper business class (no bed), and
2. It is not too hard these days to get a decent discounted business class or economy plus flight.
In fact, recently, BA had a $199 each way economy plus ticket available. That is a discounted seat that is 7" longer.
The other missing point with points tickets is that you still have to pay for taxes and fees. Once you factor this into the table, I think you will find cash is king and I will stick to my Blue Cash card from AMEX.
Sorry WSJ, but I suspect you have written about this without asking the real question you need to ask and that is for the amount you pay (not the price advertised).

Saturday, January 07, 2006

Inline HTML editors

Just found a neat HTML editor that I will try out at the concordtv web site. Seems really neat: http://tinymce.moxiecode.com/
It was mention in the comparison chart at: http://www.geniisoft.com/showcase.nsf/WebEditors

Sunday, January 01, 2006

Concord TV Grand Opening is on Thursday

The renovations have been completed and the TV Station is about to be opened.

The Grand Opening: Reception & Open House
Thursday, January 5, 2006
5:00-7:00 PM
ALL WELCOME!

The Open House is followed by the Annual Meeting of the Corporation.

http://www.concordtv.org (or 978-369-5038)

Helped create tomcat Realm for QuickPlace

Tomcat authenticates with Realms. These are nothing more than a class that will return a Principal object that contains a username, password and list of roles.
For QuickPlace there are no roles as such but there is ACL level. So, I mapped the role to the ACL entry (manager, author, reader). This will allow admins to extend QuickPlace into the J2EE world without needing to creating yet another directory.
To me, one of the really nice parts of QuickPlace is the user management. Adding, removing, editing users is really well thought out and it would be silly to have to re-work that with some complicated LDAP setup when you can use the domino backed classes to hook into the QuickPlace contacts1.nsf.
It is now up and published under GPL and hope it helps people extend QuickPlace functionality with Tomcat.
QuickPlace Realm for Tomcat