Archive for May, 2008

Sharesight article in the Herald

Saturday, May 24th, 2008

There was a great article in the Herald about Sharesight today. Shame it didn’t mention me or Marcus, but it did explain what we’ve been up to.

Check out Kiwi-made online share trading system hits the market.

2008 Budget Calculators

Thursday, May 22nd, 2008

We’ve just put together a calculator to work out your savings from Michael Cullen’s Budget 2008. It’s on the Sharesight website here:

http://www.sharesight.co.nz/tools/budget_2008_calculators/

Increment Ruby on Rails migration number

Thursday, May 1st, 2008

We recently needed to create a new database migration, and needed to insert it into at certain position. Normally what I have done in the past is to alter the migration index of an existing file or two.

But this time, it needed to go in at 003. I was going to have to manually increment about 30 or 40 migration scripts. So, it was time to apply my Ruby skills to do it automatically.

Here is the result:

So when you run it, you will get output such as:

Instructions

  1. Cut and paste the file, or download it from increment_migrations.rb.
  2. Save it somewhere
  3. Make it executable chmod 755 /path/to/increment_migrations.rb
  4. The change directory to ./db/migrations
  5. then run /path/to/increment_migrations.rb 3
  6. and if the output looks as expected
  7. finally run /path/to/increment_migrations.rb 3 RUN

Finally, thanks to the client for permission to publish. Thanks for giving back to the community!