This file contains 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 "rubygems" | |
require "superfeedr" | |
## You can have all the XMPP logging by changing the Babylon log level | |
Babylon.logger.level = Log4r::DEBUG | |
## | |
# Don't ever forget that all this is ASYNCHRONOUS... | |
# If you don't run EM in your program, then it will started for... however, EM.run begin a blocking call, you shoudl probably run it into a specific Thread to keep the rest of your app running :) |
This file contains 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 'rubygems' | |
require 'superfeedr-rb' | |
require 'pp' | |
Superfeedr::Client.connect('[email protected]', '******************') do |client| | |
client.feed('http://superfeedr.com/dummy.xml') do |status, entries| | |
pp({ | |
:status => { | |
:feed => status.feed, | |
:code => status.code, |
This file contains 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
Rails CMS alternatives | |
====================== | |
Note: project activity was checked on 11/26/09. | |
Active projects: | |
--------------- | |
adva-cms | |
repo: http://github.com/svenfuchs/adva_cms/ | |
site: http://adva-cms.org/ | |
Last update: 11/24/09 |
This file contains 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
publisher = Gnip.publisher.for('twitter') | |
publisher.filter.create('me', {:type => 'actor', :value => 'atmos'}, :full_data => false) | |
publisher.activity(:filter => 'me', :style => 'notification', :ago => '30') |
This file contains 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
lsoave@ubuntu:~/heroku$ sudo gem install superfeedr-ruby --no-ri --no-RDoc | |
Successfully installed skates-0.2.6 | |
Successfully installed superfeedr-ruby-0.4.0 | |
2 gems installed | |
lsoave@ubuntu:~/heroku$ gem list superfeedr | |
*** LOCAL GEMS *** | |
superfeedr-nokogiri (1.4.0.20091116183308) | |
superfeedr-rb (0.1.0) |
This file contains 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 'feedzirra' | |
# fetching a single feed | |
feed = Feedzirra::Feed.fetch_and_parse("http://feeds.feedburner.com/PaulDixExplainsNothing") | |
# feed and entries accessors | |
feed.title # => "Paul Dix Explains Nothing" | |
feed.url # => "http://www.pauldix.net" | |
feed.feed_url # => "http://feeds.feedburner.com/PaulDixExplainsNothing" | |
feed.etag # => "GunxqnEP4NeYhrqq9TyVKTuDnh0" |
This file contains 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
Processing RegistrationsController#create (for 127.0.0.1 at 2010-02-18 19:31:36) [POST] | |
Parameters: {"commit"=>"Sign up", "action"=>"create", "authenticity_token"=>"vFJ+NICTKyTetJ6+lNnmCeLhIRgExdx8SE3UjcVdX+g=", "controller"=>"registrations", "user"=>{"password_confirmation"=>"[FILTERED]", "username"=>"1234", "password"=>"[FILTERED]", "email"=>"[email protected]"}} | |
User Load (0.3ms) SELECT "users".id FROM "users" WHERE ("users"."email" = '[email protected]' AND "users".email = '[email protected]') LIMIT 1 | |
User Create (37.7ms) INSERT INTO "users" ("encrypted_password", "created_at", "confirmation_sent_at", "last_sign_in_ip", "updated_at", "last_sign_in_at", "username", "sign_in_count", "password_salt", "reset_password_token", "remember_token", "current_sign_in_ip", "confirmation_token", "remember_created_at", "current_sign_in_at", "email", "confirmed_at") VALUES('589449af1762051c7f6401d066840f84fef617c4', '2010-02-18 18:31:36', '2010-02-18 18:31:36', NULL, '2010-02-18 18:31:36', NULL, '1234', NULL, 'V_Vo7Uzbg2p |
This file contains 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
class SmsController < ApplicationController | |
# GET /sms/in | |
# GET /sms/in.xml | |
def in | |
@sms_in = params[:text] | |
respond_to do |format| | |
format.html # index.html.erb | |
format.xml { render :xml => @prova } | |
end |
This file contains 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
#---------------------------------------------------------------------------- | |
# Git Setup | |
#---------------------------------------------------------------------------- | |
file '.gitignore', <<-FILE | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
public/uploads/* |
This file contains 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
# remove Prototype defaults | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/prototype.js" | |
# add XHTML 1.0 Strict layout, with jQuery from Google | |
file 'app/views/layouts/application.html.erb', <<-ERB | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |