Should I take up surfing in SA?

I'm still undecided as to whether I should surf in South Africa.

Being Australian, I'm accustomed to big fish, yes. But in Queensland we only have nice ones, like Grey Nurses, and Bull Sharks. The nasty ones i.e. Great Whites are the Victorians' and South Australians' problem, not mine.

But South Africa is full of Victorians and South Australians (i.e. Great Whites);

Pastedgraphic

Source: http://www.zigzag.co.za/multimedia/galleries/434/Monster-of-Mossels

Note: This pic was sent to me by my girlfriend, whom I think does *not* want me to surf. I'm staying positive though: my chances of not getting eaten have just improved, since this bad boy is now out of circulation.

Consolidate your email accounts with Gmail - plus get some tasty spam filtering

I woke up one day and realized I had collected a bunch of email accounts over the years.

Now having lots of different accounts in your email client isn't so much fun (to setup or use). There's a lot of clutter, and even more so if you are smart and use IMAP (instead of POP3).

Plus I have this cool domain name(glenn-roberts.com) going to waste. Why have an email address like roberts.glenn.1235.blah@gmail.com?

So I consolidated them, giving me these benefits;

1. A single IMAP access point for all incoming mail. (Using my Gmail account with IMAP for incoming)

Pastedgraphic

2. Automatic labelling of messsages downloaded by Gmail (to help identify where mail came from)

0pastedgraphic

3. Advanced IMAP controls (via the Google Labs goodies)

1pastedgraphic

4. Outgoing from a different email account (I choose my new glenn-roberts.com email server for outgoing mail)

5. Automatic back ups (if you choose "Leave a copy of messages on the server in Gmails POP settings for the other accounts)

2pastedgraphic

So now all my (personal) mail comes in via one of my many accounts, but I now consistently reply via one account, and all replies come back to me via Gmail, but Spam filtered (twice, in fact).

"... one does not accumulate but eliminate. It is not daily increase but daily decrease. The height of cultivation always runs to simplicity." Bruce Lee

Using Shell aliases to speed up your Rails development (on OSX)

Tired of writing

script/server

?

How about saving yourself from carpal tunnel with handy aliases like these? ;

 
# Rails 
alias r='touch tmp/restart.txt' 
alias ss='script/server' 

Grab the source over at http://gist.github.com/218795 and whack it in your .bash_profile.

(Dont forget to set up git autocompletion first : http://blog.ericgoodwin.com/2008/4/10/auto-completion-with-git )

Multiple ActionMailer delivery methods

Looking for a way to deliver some of your ActionMailer notifications immediately (e.g. via :smtp) and others using a delayed/queued method (e.g. :activerecord using AR-Mailer (http://github.com/adzap/ar_mailer)?

Here's how I did it.

My default delivery method in my application was immedate using ActionMailer with SMTP.



# set delivery method to :smtp, :sendmail or :test


# or :activerecord for ar-mailer
 config.action_mailer.delivery_method = :smtp 

A corresponding model method action would look something like this;

 def deliver_new_registration_notice! 
  Notifier.deliver_new_registration_notice(self) 
 end

And for delayed (queued) delivery, you need to temporarily override the ActionMailer::Base.delivery_method;

 
 def deliver_existing_member_activation! 
   delivery_method = ActionMailer::Base.delivery_method 
   ActionMailer::Base.delivery_method = :activerecord #needed for bulk sending 
   reset_perishable_token! 
   Notifier.deliver_existing_member_activation(self) 
   ActionMailer::Base.delivery_method = delivery_method #reset it 
 end