Dave Elkins

Search It!

OAuth articles from stakeventures.com

July 23rd, 2009 · No Comments

A couple of good articles about integrating OAuth into your Rails app.

http://stakeventures.com/articles/2009/07/21/consuming-oauth-intelligently-in-rails

http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider

http://github.com/pelle/oauth-plugin/tree/master

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: Rails Plugins · code · rails · security

Articles about using Delayed Job in Rails

July 23rd, 2009 · No Comments

http://railscasts.com/episodes/171-delayed-job – A good railscast about using Delayed Job.

http://www.therailsway.com/2009/7/22/do-it-later-with-delayed-job – Article by TheRailsWay about why to use and how to use.

It looks like are really simple way to offload long running tasks.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: Rails Plugins · code · rails · scaling

Links about Cucumber for BDD Testing

July 9th, 2009 · No Comments

Cucumber looks interesting but I am still not sold that it is necessary.  It feels a little overkill.  What do you think?

Here are some links to see how to use it and how it works.

http://www.engineyard.com/blog/2009/cucumber-introduction/

http://www.engineyard.com/blog/2009/cucumber-more-advanced/

http://railscasts.com/episodes/155-beginning-with-cucumber

http://railscasts.com/episodes/159-more-on-cucumber

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: code · rails · testing

Another good article from intridea about CloudFront

July 9th, 2009 · No Comments

In this article, Intridea shows you how to use CloudFront and AssetPackager together and prevent stale copies of assets from being served.

http://www.intridea.com/posts/amazon-cloudfront-preventing-stale-assets

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: AWS · Rails Plugins · code · rails · scaling · web

Article about creating small unique tokens in ruby

July 8th, 2009 · No Comments

This is an article about different techniques for creating small unique tokens in Ruby.

http://blog.logeek.fr/2009/7/2/creating-small-unique-tokens-in-ruby

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: code · ruby

A really good article about setting up and running Cassandra

July 7th, 2009 · No Comments

Here is a really good article about using Cassandra from Evan Weaver.

http://blog.evanweaver.com/articles/2009/07/06/up-and-running-with-cassandra/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: code · install · rails · scaling · web

CloudFront and Paperclip plugin

July 7th, 2009 · No Comments

A good article about using CloudFront from Amazon and the Paperclip plugin for Rails.  http://www.intridea.com/posts/using-amazon-cloudfront-to-serve-assets

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: Rails Plugins · code · rails · scaling · web

a good article about scala

July 6th, 2009 · No Comments

Here is a good article about Scala.  http://macstrac.blogspot.com/2009/04/scala-as-long-term-replacement-for.html

I have been interested in Scala for a while but have not done any programming yet in Scala.  I think Scala has a lot of promise

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: scala

Making Erubis 2.6.4 and Rails 2.3 work together

June 18th, 2009 · No Comments

I decided about a week ago that I wanted to try Erubis with a Rails project to see if I got any performance boost.  So after reading the documentation, it appeared to be straightforward to install.  So I did.

But I discovered that the latest Erubis (2.6.4) and Rails 2.3 are not compatible.  After doing some googling and looking at stackoverflow solutions, the problem was still not resolved.  So I started to dig into  the problem.

I found that the main issue is that the generated ruby code from Erubis uses “_buf” as the buffer variable and Rails 2.2 and 2.3 require “@output_buffer” to be used.

The reason for “@output_buffer” to be used is that ActionView helpers like CaptureHelper are designed around “@output_buffer” being the primary buffer in the generated code.

I have created a gem called elkinsware-erubis_rails_helper that fixes these issues and allows Erubis and Rails 2.3 (for sure but it should work for 2.2).

Here is how to use it:

inside config/environment.rb and the following


config.gem 'erubis' , :version => '2.6.4'
config.gem 'elkinsware-erubis_rails_helper', :lib => 'erubis_rails_helper', :source => 'http://gems.github.com'

You can customize some of the options for Erubis still if you want to by adding config/initializers/erubis_config.rb to your initializers folder


#Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby # or Erubis::FastEruby
#Erubis::Helpers::RailsHelper.init_properties = {}
#Erubis::Helpers::RailsHelper.show_src = false
#Erubis::Helpers::RailsHelper.preprocessing = true

The source is at http://github.com/elkinsware/erubis_rails_helper/tree/master

Let me know if you have any issues with the gem.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ No CommentsTags: Rails Plugins · code · rails

Setting up Headless XServer and CutyCapt on Ubuntu

April 10th, 2009 · 9 Comments

This is a list of steps I took to setup a headless XServer and CutyCapt on Ubuntu. Please let me know if you run into any issues using these steps.

The first set of steps is to get the requirements for CutyCapt installed and the Headless XServer setup.


sudo apt-get update
sudo apt-get -y install build-essential
sudo apt-get install xvfb
sudo apt-get install xfs xfonts-scalable xfonts-100dpi
sudo apt-get install libgl1-mesa-dri
sudo apt-get install subversion libqt4-webkit libqt4-dev g++

Now lets download and install CutyCapt. Then we will run a couple of tests to make sure it is working properly.


svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
cd cutycapt/CutyCapt
qmake
make
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://www.google.com --out=example.png
xvfb-run --server-args="-screen 0, 1024x768x24" ./CutyCapt --url=http://www.google.com --out=example.html --out-format=html

I hope this helped and let me know if you have any feedback.

update: Per Paul’s comment, you may need to enable the aptitude backports repository in /etc/apt/sources.list, as this is off by default, to get the libqt4 libraries.

references

http://corpocrat.com/2008/08/19/how-to-install-xvfb-x11-server-in-linux-server/

http://cutycapt.sourceforge.net/

http://www.wonko.be/2008/01

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • DZone
  • Wists
  • BlinkList
  • blogmarks
  • Ma.gnolia
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis

→ 9 CommentsTags: code · install · web