This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
require 'rubygems' | |
require 'rest-client' | |
require 'nokogiri' | |
class ArticleFetcher | |
def self.fetch_text(url) | |
case url | |
when /video\.nytimes\.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
# These links were taken from my twitter timeline. No endorsement implied. | |
tiny_urls = { | |
'bitly' => ['http://bit.ly/3S9c5K', 'http://developer.nytimes.com/'], | |
'j.mp' => ['http://j.mp/JsML0u', 'http://www.npr.org/2012/04/26/151303230/an-african-trader-and-the-perils-of-business-in-china'], | |
'tinyurl' => ['http://tinyurl.com/6rq9vob', 'http://politicsoftheplate.com/?p=1283'], | |
'owly' => ['http://ow.ly/axesj', 'http://threatpost.com/en_us/blogs/opera-12-beta-released-new-security-features-including-do-not-track-support-042612'], | |
'ht.ly' => ['http://ht.ly/1j7LiX', 'http://rssfeeds.usatoday.com/~r/usatoday-LifeTopStories/~3/8vFV-fFfhAc/1'], | |
'is.gd' => ['http://is.gd/gk0FoM', 'http://www.wired.com/dangerroom/2012/04/joe-schmoe-drones/'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
715944 tweets collected on Wed. night for 80 minutes | |
Filtering out to clients that had at least 1% of traffic, here is the breakdown | |
Echofon: 28308 3.95% | |
Mobile Web: 16266 2.27% | |
UberSocial for BlackBerry: 47728 6.67% | |
TweetDeck: 35792 5.00% | |
Twitter for BlackBerry®: 59479 8.31% | |
Twitter for iPhone: 136235 19.03% | |
Twitter for Mac: 12870 1.80% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_dependency 'net/ftp' | |
class FTPMock | |
def gettextfile(remote_path, local_path) | |
test_file = File.join(RAILS_ROOT, 'test', 'data', 'dbready', remote_path) | |
if !File.exists?(test_file) | |
raise Net::FTPPermError, test_file + ' not found!' | |
end | |
FileUtils.cp test_file, local_path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/subversion-1.6.5/Makefile 2009-09-23 16:34:05.000000000 -0400 | |
+++ b/subversion-1.6.5/Makefile 2009-09-23 17:53:37.000000000 -0400 | |
@@ -41,8 +41,8 @@ | |
-SVN_APR_LIBS = -L/usr/lib -R/usr/lib -lapr-1 -lpthread | |
-SVN_APRUTIL_LIBS = -L/usr/lib -R/usr/lib -laprutil-1 -lsqlite3 -lexpat -liconv | |
+SVN_APR_LIBS = -L#{HOMEBREW_PREFIX}/lib -L/usr/lib -R/usr/lib -lapr-1 -lpthread | |
+SVN_APRUTIL_LIBS = -L#{HOMEBREW_PREFIX}/lib -L/usr/lib -R/usr/lib -laprutil-1 -lsqlite3 -lexpat -liconv | |
SVN_APR_MEMCACHE_LIBS = | |
SVN_DB_LIBS = | |
SVN_GNOME_KEYRING_LIBS = |
NewerOlder