Skip to content

Instantly share code, notes, and snippets.

View penso's full-sized avatar

Fabien Penso penso

View GitHub Profile
#!/usr/bin/ruby
require 'rubygems'
require 'twitter'
users = %w/user1 user2 user3/
httpauth = Twitter::HTTPAuth.new('YOUR LOGIN', 'YOUR PASS')
base = Twitter::Base.new(httpauth)
base.friends_timeline.each { |tweet|
if tweet.text =~ /appnotification/
ActionController::MethodNotAllowed (Only get and post requests are allowed.):
passenger (2.2.4) lib/phusion_passenger/rack/request_handler.rb:91:in `process_request'
passenger (2.2.4) lib/phusion_passenger/abstract_request_handler.rb:206:in `main_loop'
passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:376:in `start_request_handler'
passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:334:in `handle_spawn_application'
passenger (2.2.4) lib/phusion_passenger/utils.rb:182:in `safe_fork'
passenger (2.2.4) lib/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in `__send__'
passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in `main_loop'
require RAILS_HOME + "/config/boot"
require "active_support"
require "activerecord"
require RAILS_HOME + "/app/models/app.rb"
ActiveRecord::Base.establish_connection
require RAILS_HOME + "/config/boot"
require "active_support"
require "activerecord"
require RAILS_HOME + "/app/models/app.rb"
ActiveRecord::Base.establish_connection
require 'test_helper'
#require 'tmail'
class UserTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
require 'test_helper'
#require 'tmail'
class UserTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
picasso: App Notifications is an iPhone App that acts as a client for the Apple Push Notification Service. Use our ready-made Twitter and Gmail notification services to instantly receive new tweets, search results, and emails, or create your own custom notifications with our simple REST API.
18:02 < bitwise> hap: "Can't afford your own push notification infrastructure? Use ours. Its easy and cheap."
18:02 < bitwise> and then show a one liner for a url request to the REST api for the "easy" part, and give pricing for the "cheap" part.
18:03 < jfsd> Do you need to know right away when a mission critical Gmail message has arrived? When your son or daughter posts an SOS message to Twitter? Do you want your wife to be able to pop a message up on your iPhone even when it's locked?
require 'superfeedr'
Superfeedr.connect(APP_CONFIG['superfeedr_login'], APP_CONFIG['superfeedr_password']) do
Superfeedr.subscribe(feed) do |result|
if result
puts "Subscribed to : #{feed}"
update_attribute(:sent, true)
end
end
end
clnt = HTTPClient.new
clnt.debug_dev=STDOUT
clnt.cookie_manager = nil
clnt.set_auth("http://superfeedr.com/", APP_CONFIG['superfeedr_login'], APP_CONFIG['superfeedr_password'])
clnt.post_content("http://superfeedr.com/hubbub", query) do |chunk|
puts chunk
end
Processing UsersController#update (for XXX at 2009-09-12 14:38:27) [PUT]
Parameters: {"commit"=>"Update", "action"=>"update", "_method"=>"put", "controller"=>"users", "user"=>{"silent_mode_at(5i)"=>"00", "password_confirmation"=>"[FILTERED]", "silent_mode_at(1i)"=>"", "last_name"=>"XX", "silent_mode_at(2i)"=>"", "time_zone"=>"Paris", "silent_mode_at(3i)"=>"", "password"=>"[FILTERED]", "silent_mode_at(4i)"=>"18", "first_name"=>"Fabien", "email"=>"XX@gmail.com"}}
ActiveRecord::MultiparameterAssignmentErrors (1 error(s) on assignment of multiparameter attributes):
app/controllers/users_controller.rb:164:in `update'