house9

random code and what not

CSS position:relative + position:absolute

I do alright with css positioning but I just don’t do enough css to have it mastered; anyhow I needed to float an image over into the right upper corner of a form, no problem put a div at the bottom of the form with position relative and top at -xyz. this worked but was not ideal, depending on the amount of fields in the form I would have to adjust the top setting for each, also the alignment was not consistent enough across browsers, so a google search was on once again…

Came across this great post, see tab 4 “position:relative + position:absolute”, using a relative div with a nested absolute div, I did not even know this was possible but it appears to work great!

2009 Grasshopper Adventure Series

A really fast bike ride or is it a race? you choose

The schedule for 2009 Grasshopper Adventure Series is out!
  • 2009-02-28 Old Caz
  • 2009-03-07 Chileno Valley
  • 2009-04-11 Lake Sonoma 
  • 2009-05-09 King Ridge 
this year there is actually an entry fee - times they are achanging
read more here 

Best binoculars for birding

Well the best binoculars for birding are probably Swarovski or Zeiss, but both of these are very expensive and if you want to get really close to the same quality but for a third of the price I highly recommend Savannah Phase-Coated Waterproof Binoculars from Orion. The Savannah comes in at less then $400 vs over $1000. 



Don’t get me wrong, a good friend of mine has a pair of Swarovski and they are excellent! The key difference is in low light conditions the Swarovski do out perform the Orions but for most of the birding I do the Orions do the job and do it well. I have been using the 10x50 for over 4 years now and they are great for birding from the car, a smaller pair would be more ideal for hiking or other on the move activities.
Not sure why they name those two models differently they are both Phase-Coated and waterproof - they are the exactly the same just different size. Also, looking around on Orions site I do not see the 10x50 available anymore (one pair left over at Amazon)? hopefully they have not discontinued those. There is the Savannah Porro 10x50 but I am not familiar with that model, it appears to be less expensive and might be great buy for the money?

words to live by

this quote really grabbed my attention
from the NOOP.NL blog; an article called ’5 easy Questions for Ron Jeffries

…look for the good in every moment, and love it, while avoiding the bad without hating it.
 - Ron Jeffries

easier said then done but definitely a goal worth pursuing.


Dilbert Share Point Web Part

I have a love hate relationship with Microsoft Share Point. It has really good integration with Office products but also has a lot of irritating ‘features’. Anyhow I knew there had to be a web part out there to get the latest Dilbert comic strip and after a quick Google search I found it!

http://www.nogeekleftbehind.com/2007/11/21/download-daily-dilbert-web-part-for-sharepoint/

no share point portal is complete without it!

Comments

CoUgar
super :) thanks for the link

Rails 2.1 and 2.2 documentation

This post is for personal reference, I keep losing track of the url to this great resource. Ruby on Rails guides at http://guides.rails.info/ I think this site launched when rails 2.1 came out, it is still a work in progress but is an extremely valuable resource covering everything from ‘getting started’, active record associations, security, debugging, the new 2.2 Rails Internationalization API and more.

Ruby on Rails guides at http://guides.rails.info/

Calling rake tasks from another rake task

This turns out to be pretty straight forward, but was not obvious

Rake::Task['task_name'].execute

A rake task to rebuild the development database
desc 'drop, create and rebuild development db'
task(:rebuild_development_db) do
puts "drop the db"
Rake::Task['db:drop'].execute
puts "create the db"
Rake::Task['db:create'].execute
puts "run the migrations"
Rake::Task['db:migrate'].execute
# do other stuff...
end

Resources

Comments

House 9
Also if the task you are calling takes args you can pass them in a hash to the execute method

some_value = "testing"
Rake::Task["your_task"].execute({:some_param => some_value})

read more about rake args
http://dev.nuclearrooster.com/2009/01/05/rake-task-with-arguments/
Anonymous
Awesome! Thanks!