phup 'n stuff

Another Blog About Being a Developer

Archive for January, 2009

Constraints in Rails Migrations

Thursday, January 22nd, 2009

I decided to try a rails project again… something I do quite frequently after I've completely forgotten everything I've learned.

One thing I quickly remembered is that there is no easy way in a migration to create constraints, like a foreign key. You have to do some exec silliness with an actual query.

After some quick searching, I found this plugin: http://rubyforge.org/projects/mig-constraints
(more…)

Using Flowplayer and ffmpeg to Stream Video

Sunday, January 18th, 2009

We recently had a client that had a need for hosting and streaming videos from their website. These videos were public domain videos, some found on YouTube, NASA's website, and other resources, and the client was concerned that the videos might be taken down or moved, so they were insistent on hosting the videos on their site. There was also a desire to not require users to have to install Windows Media Player, Quick Time, Flash to be able to view all videos.

(more…)