Play XviD with audio in Quicktime Player

Written about 1:40 am — Tuesday, November 21st

I don’t know how many people care, but sometimes I just want to use Quicktime player (or another Core Audio-based app) to play video files. The problem is, a lot of files these days have 5.1 channel AC-3 audio.

I finally found the key: A52Codec

Download it here

Now, off to watch Heroes in HDTV…

Drop-in Yahoo Browser Based Authentication for Rails

Written about 10:42 pm — Monday, October 2nd

Tonight I’m releasing my first plugin. This is the result of about half the work I did with my team at at . I wrote the guts, but generous amounts of Rails plugin goodness were provided by Scott Fleckenstein.

The Plugin:

It’s a drop-in addition to ActionController that allows you to define a consumer of Yahoo’s unified login scheme that was released last week, called Browser Based Authentication, or BBAuth. More info

It’s configurable so that you may define your own endpoint within the Rails app and a controller method is defined to allow you to easily retrieve the necessary credentials for authenticated API calls after the initial login. It’s up to you to handle the storage of the returned cookie and wssid.

Many of Yahoo’s APIs are currently open, and each of them is slightly different. I left this complexity out of the plugin to make it as simple to use and unobtrusive as possible. You can contact me at cameron at this domain if something is busted. I’d like this plugin to “just work” so if something is wrong, let me know.

You can see the plugin in action in a dummy application at http://hackday2006.rubyredlabs.com/

Instructions:

Unzip the archive and drop it in your vendor/plugins folder.

You’ll need to register your application with Yahoo here. Configuring the plugin is easy, after you have followed all the instructions on Yahoo’s developer website about authenticating your application’s domain. The only necessary configuration is to place the following in config/yahoo.yml:

application_id: YOUR_APPLICATION_ID
secret: YOUR_SECRET

Download: Yahoo BBAuth plugin

Sample Controller

class UsersController < ApplicationController
  authorizes_through_yahoo

  def index
  end

  verify :params => [:token, :sig, :appid, :ts], :only => :get_credentials, :redirect_to => :index
  def get_credentials
    @credentials = request_yahoo_credentials(params[:token])
  end

end

In this example, assuming the route ':controller/:action/:id' exists, the value to enter in “Web Application URL” when registering your app with Yahoo is http://your-domain.com/users/get_credentials

Update: Looks like the error messages weren’t being passed through to the exception. Code has been updated!

NEW:

    raise YahooAuthorizationException.new("Yahoo BBAuth error: %s %s" % 
      [ doc.elements['//Error/ErrorCode'].text.strip,
        doc.elements['//Error/ErrorDescription'].text.strip ]) unless doc.elements['//Success']

OLD:

    raise YahooAuthorizationException.new("Yahoo BBAuth error: :code :message" % 
      { :code => doc.elements['//Error/ErrorCode'].text.strip,
        :message => doc.elements['//Error/ErrorDescription'].text.strip }) unless doc.elements['//Success']

Technorati Tags:

Birfffffday

Written about 1:36 pm — Monday, June 26th

So… I had a lot of fun turning 25. Thanks to everyone who made it to my sloshball party and BBQ, and thanks to everyone who wished me well or told me “happy birthday.”

You all rock! And for that, you get Rocky… Ninja Rocky:

Woo hoo!

btw: I’m sure you can find more silly pictures by looking for ceedub25 on flickr.

technorati tags:, ,

What’s new at the ‘Labs

Written about 9:23 am — Tuesday, May 30th

Since school ended, I’ve been up to my ears in Rubyred. It’s been great, and I get to have weekends now, instead of homework. But, the real point of this post is to share how much fun we have workin’ down at the ranch…

See the video on YouTube

Not Dead! (Really)

Written about 10:58 pm — Thursday, April 13th

Phew! I’ve been so damn busy lately I literally forgot that I have a blog. What a doof.

So what have I been up to? Let’s see, I…

  • Wrote a special purpose peer-to-peer client using Rails for my Distributed Software Dev class
  • Did a ton of work on RSyndicate (almost ready for launch as of this writing) for Rubyred Labs
  • Got served an eviction notice after my roommate Eric moved out (our last “official” tenant)
  • Found a new place to live in the mission
  • Drank a bunch of beer with The Ryan King and Eran (a.k.a. limbo) of supr.c.ilio.us at such venues at Toronado, Martin Macks, 21st Amendment, and The House of Shields
  • Went from a faux hawk to a buzz cut and back to a faux hawk

So that’s why I forgot to write stuff here. I hope that anyone who reads this is happy to see that I’ve decided to post again. :)

On a side note, overheard in the Haight:

“When you’re naked in a hot tub with a bangin’ bitch like that, you just don’t give a fuck! You gotta just go for it.”

Damn straight!

Back to School?

Written about 12:13 pm — Monday, January 23rd

Spring semester officially begins today. What does that mean for me? It means I’ll be attending class again for the first time in about 6 weeks. What a strange feeling.

I was used to the quarter system at UC Davis, but USF is a semester school. I can tell you that I like semesters a whole lot better. What’s the University of California thinking, anyway? “Let’s cram 16 weeks worth of class into 10 weeks and make each unit worth less. Oh, and your vacations are going to be very short, too.” Great idea, guys.

Anyway, the long break has been, for lack of a more expressive phrase, f!@#ing great. I got a chance to spend a lot of time with Stacy, party with all my San Francisco friends many many times, be generally debaucherous, and start working with the great people at Ruby Red Labs.

I do say, a productive vacation. It’s over now, but things have just begun…

Work Post

Written about 3:03 pm — Friday, January 6th

This might piss off all (3?) of my readers… but I’m just writing a post because I need it for testing. Yeah, it’s for work. Yeah, I know I never write. It’s because I’m busy :-).

The test data:

neuro Omatis
France home address mail and shipments: 12 rue Danton Le Kremlin-Bicetre 94270 France
N 48° 81.6667 E 2° 36.6667

Starbucks
2224 Shattuck Ave. Berkeley, CA 94704
37.868925 -122.268047

Thank you. Come again.