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
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I"/Users/james/Documents/code/paperclip/lib" -I"/Users/james/Documents/code/paperclip/lib" -I"/Users/james/Documents/code/paperclip/profile" "/Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/attachment_test.rb" "test/geometry_test.rb" "test/integration_test.rb" "test/interpolations_test.rb" "test/iostream_test.rb" "test/matchers/have_attached_file_matcher_test.rb" "test/matchers/validate_attachment_content_type_matcher_test.rb" "test/matchers/validate_attachment_presence_matcher_test.rb" "test/matchers/validate_attachment_size_matcher_test.rb" "test/paperclip_test.rb" "test/processor_test.rb" "test/storage_test.rb" "test/thumbnail_test.rb" | |
(in /Users/james/Documents/code/paperclip) | |
./test/interpolations_test.rb:10: warning: parenthesize argument(s) for future version | |
Loaded suite /Library/Ruby/Gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader | |
Started | |
................................................................ |
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
def new_session(as_user_with_nickname) | |
open_session do |s| | |
s.extend(Webrat::Matchers) | |
s.extend(Webrat::Methods) | |
unless as_user_with_nickname.nil? | |
s.visit login_url | |
s.fill_in "Nickname or Email", :with => as_user_with_nickname | |
s.fill_in "Password", :with => "swordfish" | |
s.click_button "Login to Fetlife" |
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 Creditor | |
observes :message, :invokes => :use_credits, :on => :create | |
observes :conversation, :invokes => :use_credits, :on => :create | |
def use_credits(user) | |
# use credits | |
end | |
end | |
class Conversation < ActiveRecord::Base |
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
Net::SSH::Simple.new do |s| | |
s.servers "server1" | |
exit_code = s.run "ls -la" do |cmd| | |
cmd.on_stdout do |stdout| | |
end | |
cmd.on_stderr do |stderr| | |
end | |
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
class UsersController < ApplicationController | |
respond_to :html, :xml | |
# GET /users | |
# GET /users.xml | |
def index | |
@users = User.all | |
respond_with(@users) | |
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
require 'rubygems' | |
require 'cassandra' | |
t = Cassandra.new "Twitter" | |
10000.times do | |
t.insert :UserRelationships, "5", {"statuses" => {Cassandra::UUID.new => "1234"}} | |
end | |
# make sure to ctrl-c out of this before it finishes | |
t.get :UserRelationships, "5", "statuses", :count => 100 | |
>> t.get :UserRelationships, "5", "statuses", :count => 10000 |
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
>> User.find(1).timeline.stories.all(:limit => 20, :reversed => true) | |
Thrift::TransportException: Broken pipe | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/thrift-0.0.789419/lib/thrift/transport/socket.rb:88:in `write' | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/thrift-0.0.789419/lib/thrift/transport/buffered_transport.rb:64:in `flush' | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/thrift-0.0.789419/lib/thrift/client.rb:41:in `send_message' | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/cassandra-0.5.5/lib/../vendor/gen-rb/cassandra.rb:21:in `send_get_slice' | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/cassandra-0.5.5/lib/../vendor/gen-rb/cassandra.rb:16:in `get_slice' | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/cassandra-0.5.5/lib/cassandra/safe_client.rb:11:in `send' | |
from /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/cassandra-0.5.5/lib/cassandra/safe_client.rb:11:in `method_missing' | |
from /opt/ruby-enterprise/lib/ruby/gems/1. |
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
#4 Cassandra::Columns.sub_columns_to_hash(column_family#String, columns#Array) | |
at line /home/fetlife/cassandra/lib/cassandra/columns.rb:50 | |
(rdb:1) v l | |
column_family => "TimelineRelationships" | |
columns => [<CassandraThrift::ColumnOrSuperColumn column:<CassandraThrift::Column name:"action", value:"\"post_comment_created\"", timestamp:1251748451797163>>, <CassandraThrift::ColumnOrSuperColumn column:<CassandraThrift::Column name:"actor_id", value:"43007", timestamp:1251748451797163>>, <CassandraThrift::ColumnOrSuperColumn column:<CassandraThrift::Column name:"body", value:"\"<blockquote>I'm really sorry, sweetie. <\\/blockquote>\"", timestamp:1251748451797163>>, <CassandraThrift::ColumnOrSuperColumn column:<CassandraThrift::Column name:"created_at", value:"\"2009/07/16 02:31:26 +0000\"", timestamp:1251748451797163>>, <CassandraThrift::ColumnOrSuperColumn column:<CassandraThrift::Column name:"schema_version", value:"0", timestamp:1251748451797163>>, <CassandraThrift::ColumnOrSuperColumn column:<Cassandr |
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
>> User.find(1).timeline.stories.all(:limit => 1000) | |
["get_slice", | |
CassandraThrift::Cassandra::Get_slice_args, | |
{:keyspace=>"FetLife", | |
:column_parent=><CassandraThrift::ColumnParent column_family:"Timelines">, | |
:key=>"1", | |
:consistency_level=>1, | |
:predicate=> | |
<CassandraThrift::SlicePredicate slice_range:<CassandraThrift::SliceRange start:"", finish:"", reversed:false, count:100>>}] | |
["get_slice", |
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
Hi James, | |
I wanted to reach out to you and see if you are the correct person at FetLife to discuss your web caching infrastructure? Gear6 offers a turnkey Memcached solution that can increase your revenue AND reduce your total cost of ownership(TCO) by 70%. The Gear6 Memcached solution allows for High Availability, Replication, Clustering, Server consolidation as well as Management Reporting for your dynamic web site. | |
About Memcached: | |
Today 17 of the top 20 most trafficked sites - including Facebook, Twitter, Digg and Wikipedia - depend on Memcached to enhance their user experience by increasing website performance. Memcached is a powerful open source distributed memory caching system and has become the de-facto standard for the web caching tier. | |
About Gear6: | |
Gear6's flagship offering is Gear6 Web Cache, a Memcached protocol-compliant solution that enables web site developers and operators to scale web services and applications. Gear6 solutions can save you money, rack space, power and time, as well as |