Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Jamie Wilkinson http://tramchase.com

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

simple Ruby RSS reader

// fetch & parse RSS into an object

require 'rss/2.0'
require 'open-uri'

class RssReader

  def parseFeed (url, length)
    feed_url = url
    output = "";
    open(feed_url) do |http|
      response = http.read
      result = RSS::Parser.parse(response, false)
      output = "\"feedTitle\">#{result.channel.title}
" end return output end end

Increase the number of simultaneous XmlHttpRequests in Firefox

Firefox doesn't do a lot of simultaneous AJAX (or any kind of HTTP) requests. IE caps it at 2, too. This will allow you to test your XHR overload scripts, or just load pages faster in general.

1. Go to "about:config"
2. Find and edit the following
* network.http.pipelining=false
* network.http.pipelining.maxrequests=4
* network.http.proxy.pipeline=false
3. Make the false's true; I set my maxrequests at 20
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed