Jabber with Ruby 1

Posted by Colin A. Bartlett Thu, 20 Dec 2007 02:09:00 GMT

I got curious on how easy it might be to integrate Jabber with some Ruby projects. Turns out, it’s dead simple. (Why would I ever think otherwise?) That’s due to the efforts of the folks over at the xmpp4r project. One can do it with a simple little script of a dozen lines or so, once that package is installed. Something like this:

require 'xmpp4r/client'
include Jabber
client = Client::new(JID::new('username'))
client.connect
client.auth('password')
client.send Message::new(colinbartlett@gmail.com,"test!!").set_type(:normal).set_id('1')
client.close

On our project list coming up is integrating Jabber with our Nagios server so that notifications can be sent to us via IM when we’re online instead of SMS. (To avoid the $70 SMS bills in months when one of the servers has a bad day!).

Ads for open source projects on Google? 1

Posted by Colin A. Bartlett Fri, 14 Dec 2007 12:19:00 GMT

I was shocked the other day to see sponsored Ad Words ads on Google under the keyword “email ruby” that seemed to be advertising a project on RubyForge:

I wonder if someone at the RubyMail project is paying to place these ads on Google? If so, I wonder why? Or perhaps Google gives these out for free some how? Do other open source projects have ads on Google?

Since the RubyMail project has one developer and one file last posted in April 2004, it seems odd that anyone would be paying for ads for such an inactive project.

Flushing OS X DNS cache

Posted by Colin A. Bartlett Mon, 10 Dec 2007 16:39:00 GMT

I don’t know why it took me so long to learn this but this command is very handy:
dscacheutil -flushcache

update: I originally posted that the command was dnscacheutil. It’s actually just dscacheutil. I’ve fixed it above. I also learned this is a Leopard-only tool.

It’s equivelant to the following Windows, which was always very handy when changing DNS configuration around:

ipconfig /flushdns

Short Introduction to RDFa, OWL and Microformats [LINK] 1

Posted by Justin Reagor Sun, 09 Dec 2007 18:29:00 GMT

I just started following the OntologyOnline project, and reading David Decraene’s blog.

He has an excellent post on Embedding OWL-RDFS syntax in XHTML with RDFa. It serves as a great introduction into RDFa, OWL, Microformats and “Web 3.0”. It also dives into the possibilities as to why these technologies haven’t gained much popularity in the online community. As well as whats higher up along the Microformats food chain.

I don’t like to LINK often, but when I do its for articles like this! I am on a constant battle trying to relate my web standards friends, with little Microformats knowledge, into why we need a more semantic web (and why we need to start considering these technologies).

rfacebook isn't Rails 2.0 compatible 4

Posted by Colin A. Bartlett Sat, 08 Dec 2007 19:24:00 GMT

I started messing around with Facebook app development today just for fun. Since Rails 2.0 is out, I figured I’d use it. However, I quickly discovered the rfacebook gem is not Rails 2.0 compatbile. It’s still using the old render_text method which is now replaced with render(:text => "").

So for now, I just added this to my application.rb:

  def render_text(text)
    render(:text => text)
  end

Which seems to get me up and running. But who knows how many other little issues like this there are. Perhaps I should switch the app back to the previous Rails version? Or maybe I’ll just push forward and submit patches to rfacebook for these.

Rails 2.0 is here 1

Posted by Colin A. Bartlett Sat, 08 Dec 2007 02:27:00 GMT

# gem update rails --include-dependencies
Updating installed gems...
Attempting remote update of rails
Successfully installed rails-2.0.1

Sweet! The time has come. There goes another weekend buried in geekery. I’m going to spend some time going through the PeepCode Rails 2.0 PDF and playing around with ideas for a couple apps I’m doodling with.

Older posts: 1 2