Wednesday, May 31, 2006
To MacBook Pro or not?
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
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
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
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.
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
Thursday, March 30, 2006
Hunting down invalid signatures
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 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/enforceyou can echo a "1" to turn it back on.
Thursday, March 09, 2006
Looking forward to some Sun
Friday, February 24, 2006
Setting up BIND locally on XP
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
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
Wednesday, February 08, 2006
Is Ruby beyond Java?
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
Tuesday, January 24, 2006
Cash is king - not miles
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
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 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)