Tech Tidbits - Ruby, Ruby On Rails, Merb, .Net, Javascript, jQuery, Ajax, CSS...and other random bits and pieces.

Sunday, December 30, 2007

How to pass variables thru a DataGrid hyperlink column

<asp:HyperLink NavigateUrl='<%# "SomePage.aspx?someparam=" + DataBinder.Eval(Container, "DataItem.PropertyID") %>' runat="server" />

Wednesday, December 19, 2007

Ruby Blog

I've decided to create a Ruby only blog, though I'll keep cross posting here for now...who knows, I may change my mind and just keep the one blog here...


Viewing .CHM files on Mac OS X - Chmox

I tried several Mac options and had no luck (xchm froze, libchmxx has a utility called chmdissect - it worked, but no images)...finally, I struck gold with Chmox.

1) Install CHMLIB -

% ./configure
% make
% sudo make install

2) Install Chmox -

The binary is a standard dmg on the dmg file and move the application over to your application directory.

Monday, December 10, 2007

Sending E-mail with Ruby Net::SMTP

All you need to know is here:

def send_email(from, from_alias, to, to_alias, subject, message)

msg = <<EOF
From: #{from_alias} <#{from}>
To: #{to_alias} <#{to}>
Subject: #{subject}


Net::SMTP.start('localhost') do |smtp|
smtp.send_message(msg, from, to)


Or if your mail server is on another machine:

Net::SMTP.start(mail_server, port, helo_domain) do |smtp|
smtp.send_message msg, from, to

For example:

smtp.send_message('your.smtp.server', 25, 'mail.from.domain')

About Me

My photo
Developer (Ruby on Rails, iOS), musician/composer, Buddhist, HSP, Vegan, Aspie.