Rails3 and Datamapper quick start May 21st, 2010



Rails3 is almost released and I decided to try it out with Datamapper to see how things work. Things work AWESOME!

Here's a rundown of the steps I used:


gem update --system # you need rubygems >= 1.3.6
git clone http://github.com/rails/rails.git
cd rails
rake install
cd ..
rails my_dm_rails3_app -m http://github.com/jeremyd/rails-templates/raw/master/dm_rails_master.rb
cd my_dm_rails3_app
bundle install
Note: I cloned snusnu's repository here and modified to install a Gemfile that uses prerelease rubygems instead of git repository checkouts. This seems much faster and there were less dependency problems for me..

vim plugin for Git integration, VCSCommand February 23rd, 2009


Yay, just switched to using Git at my workplace!! FINALLY, a chance to learn more about GIT which turns out to be the new king of all that is SCM

Found a sweet plugin for vim called vcscommand.

Clone the plugin. Merge copy the files from plugin/*, syntax/* into ~/.vim/*

Read doc/vcscommand.txt for the awesome commands.

The commands I like are: VCSVimDiff (love vimdiff!!), VCSBlame

vim ctags goto definition and omni-complete August 16th, 2008


When you're reviewing or writing lots of code, it helps to have a sharp tool. I prefer to write ruby and just about everything else in vim since it's available on all platforms and I'm constantly switching from platform to platform (mostly Linux and OSX these days though).
Vim is a great, lightweight, powerful editor with all the features that any other editor can provide (yeah, even the famed textmate has nothing vim doesn't have). The steps below can get you going at a birds eye view.

1) compile vim with ruby support (if you don't already have it). To see if ruby support is enabled type 'vim --version' and look for "+ruby". If you see "-ruby" then ruby support is not enabled.

2) install ctags (via apt-get or ports). You can run it in your project's directory and jump-to-definition will start working:

ctags -R --exclude=*.js
3) install the rails-vim plugin into ~/.vim

4) cook up a great .vimrc
set smartindent
let g:rails_menu=2
set viminfo^=!
colorscheme desert
syntax on
set path=~/myproject/trunk/**
set tabstop=2
set expandtab
set shiftwidth=2
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
VIM commands
Jump to tag (ie: go to definition of the method under your cursor)
Control + ]

Bring up the OMNI complete window in insert mode
Control+X Control+O

DV video capture and edit in Ubuntu linux August 12th, 2008


Video editing capability is a necessity these days, when I finally found a good combination of software to use I was very happy. After-all, all you students and poor people out there, it's not like you want to have to go pirate Final Cut Pro or anything like that just to practice some skillz as an amateur film producer .. Video editing should be free! Content is King!!

Use DVgrab directly (no need for fancy UI here)

sudo apt-get install dvgrab
To capture (plug in your firewire DV cam or whatever):
sudo dvgrab -a outfile-
Then use Cinelerra to edit the raw DV output files.
When you are done editing, save back into format RAW dv

From there use a program such as DeVeDe ...
sudo apt-get install devede
devede


These are the basics that will get you going in a professional way! I am very happy to see that Cinelerra has matured so much and the Ubuntu packages are working flawlessly on my main workbeast that currently runs Ubuntu Gusty. Thanks a bunch!

del.icio.us tag cloud August 7th, 2008

Look how easy it is to add a del.icio.us tag cloud to your blog.
I will just file this away in it's own section and publish away!
I haven't posted in a while, but I have a lot to spew out onto the blog here very soon ... (hold breath)

March madness HDTV is my desktop background in Ubuntu Gusty. What's yours? March 16th, 2008



The purpose of this post is for me to contribute all the useful information I've gathered on HDTV recording and playback over the last year on NVIDIA+Ubuntu platform.



First off, I'd like to say that not enough linux tutorials are specific enough about hardware branding. If you have hardware that works well out of the box, be loud about it! Plenty of people are out there looking for good linux compatible hardware and even a random blog post can help someone make the right hardware decision.

Hardware:

To playback/record HDTV in Linux, you gotta have the right hardware. You need an NVIDIA graphics card for great compiz-fusion compatibility and a chance at XvMC (that's short for X-Video Motion Compensation). You also need a pcHDTV 5500 tuner card from these guys. Now, it's important to note, I'm talking about broadcast HDTV here (not cable, because I don't have it).

Software:

Using the tools for recording HDTV:

Using the tools for playback of HDTV

Hope you enjoy!

Thanks for checking this out. It's a work in progress but could be very useful to someone who's a linux video geek like myself. Leave a comment!