Conceptronic CSATAi23U

Posted by tom January 29th, 2008

The conceptronic CSATAi23U – Serial ATA & IDE to USB adapter – works flawlessly with Mac OSX 10.5 (Leopard). No need to install drivers. Just insert your hard-disk in the connector and insert the adapter in the device and then turn on the device. At this point an orange LED should show and only then connect it to your Mac. Perfect!

Game in JavaScript

Posted by tom January 27th, 2008

I’m truly aMazed! James Edwards created a maze game using JavaScript/HTML/CSS and a bunch of images.

DBVisualizer

Posted by tom January 15th, 2008

After evaluating loads of DB GUI apps for Mac OSX, I’ve finally made my decision. It seems that DBVisualizer is more than able to fit my needs, allows for data entry/export and creation and altering of tables. It also allows for a uniform view into multiple databases (MySQL/PostgreSQL/etc). It doesn’t have a great Mac OSX (Leopard) look & feel, but it’s not all that bad either! All in all I’d recommend it!

Installing MySQL gem on Mac OSX 10.5 (Leopard)

Posted by tom January 15th, 2008

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5

Ruby Units

Posted by tom January 6th, 2008

While we’re at it here’s also a little info about the brilliant gem “ruby-units”, which takes away all the nasty conversion from you.

It can be easily installed using the known:

gem install ruby-units

Here’s some sample code:

require 'rubygems'
gem 'ruby-units'
require 'ruby-units'

c = Unit.new("100cm") >> "ft" 
puts c.scalar
k = Unit.new("100","kg") >> "lbs" 
puts k.scalar

Ruby Currency

Posted by tom January 6th, 2008

Today, while I was looking how to do Currency conversion in Ruby in a simple manner, using up-to-date rates, I found the currency ruby gem, which can easily be installed using the regular:

gem install currency

Here’s example code (Using RubyGems 1.0.1):

require 'rubygems'
gem 'currency'

require 'currency'
require 'currency/exchange/rate/deriver'
require 'currency/exchange/rate/source/xe'
require 'currency/exchange/rate/source/timed_cache'

# Rate source initialization
provider = Currency::Exchange::Rate::Source::Xe.new
deriver  = Currency::Exchange::Rate::Deriver.new(:source => provider)
cache = Currency::Exchange::Rate::Source::TimedCache.new(:source => deriver)
Currency::Exchange::Rate::Source.default = cache

usd = Currency::Money('6.78', :USD)
puts "usd = #{usd.format}" 
cad = usd.convert(:CAD)
puts "cad = #{cad.format}" 

Trying to write a Rails ConnectionAdapter

Posted by tom January 6th, 2008

Today I’ve started with trying to write a Rails Connection Adapter for IBM U2 (UniData/UniVerse). There’s very little documentation available, only a couple of examples.