Introduction to MongoDB – Part III, MongoMapper & Rails

This is the third and final episode on introduction to MongDB. In this screencast, we demonstrate MongoMapper and how to use it in a Rails app. Get the code at http://blog.rubyhead.com/files/mongodemo.zip

Introduction to MongoDB – Part III, MongoMapper & Rails.

Introduction to MongoDB – Part II, Ruby

This is the second part of the series on MongoDB. In this screencast, we create a small Sinatra app called YASI that accesses the data using MongoDB. Get the code at http://blog.rubyhead.com/files/yasi.zip

Introduction to MongoDB – Part II, Ruby

Introduction to MongoDB – Part I

Here it is, the first of a series on MongoDB. I decided not to go over the concepts since there are extensive coverage already on the net. I highly recommend the presentation slides from nyc.rb and also checkout Peepcode’s screencast on CouchDB.

Teach Me To Code

Introduction to MongoDB – Part I from Joon You on Vimeo.

RubyHead Short – Vim & Me Part II, Multi-line Editing

vim makes multi-line edit a breeze as I use the feature to comment out multiple lines. Just use v->ctrl-v to select the lines. Use shift to enter i or r.

RubyHead Short – Vim & Me Part II from Joon You.

RubyHead Short – Vim & Me Part I

RubyHead Short – Vim & Me Part 1.

Notes:

for toggling NERDTree, from my .vimrc,
nmap <silent> <Leader>\ :NERDTreeToggle<CR>

Installing MongoDB Screencast

This is me installing MongoDB on my Snow Leopard Macbook Pro.

Komodo Edit – TextMate Alternative

There are lots of screencasts popping up about TextMate these days. In this screencast (please watch it in HD), I introduce the text editor of my choice for those who cannot use TextMate. This is a brief introduction and depending on the response, I’ll make it a series to cover other neat features, so please comment.

International Method Name Experiment – Screencast Short

Sorry, I screwed up on the size of the video… Still learning… ;)

RubyHead Screencast Short – Subdomain in Rails

Ever wonder how Rails apps can recognize your account by subdomains? Well, here’s how.

Google CSE With Ruby

In this episode, I create a web service object that grabs Google CSE result and convert it into accessible data by other Ruby objects.

Special thanks goes out to Avi Flombaum of www.designerpages.com for giving me the permission to use the code.

Code:

require 'rubygems'
require 'net/http'
require 'json'
require 'googlecseid'

class GoogleCSE
  class << self
    def find(term)
      begin
        resp = Net::HTTP.get_response("ajax.googleapis.com", URI.encode("/ajax/services/search/web?v=1.0&q=#{term}&cx=#{GOOGLE_CSE_ID}"))
      rescue
        return "Network error"
      end
      return "Server error" if resp.code == 200
      parse_result resp.body
    end
    def parse_result(result)
      search_result = []
      data = JSON.parse(result)["responseData"]["results"]
      data.each do |item|
        search_result << {  :title => item["titleNoFormatting"],
                            :url => item["url"],
                            :cache_url => item["cacheUrl"],
                            :content => item["content"]}
      end
      return search_result
    end
  end
end

Next Page »

Clicky Web Analytics
Powered by Olark