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
Verifying that +rk is my openname (Bitcoin username). https://onename.io/rk |
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
# Ever get tired of people messing with your ruby classes? | |
# now you can put the hammer down and stop them. Just | |
# include this module and no one will be able to modify the | |
# class implementation or any instance implementations. | |
module Stop | |
module CantTouchThis | |
def self.included(mod) |
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
c197493644ea54b514965e448ac60fab |
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
# Ever get tired of people messing with your ruby classes? | |
# now you can put the hammer down and stop them. Just | |
# include this module and no one will be able to modify the | |
# class implementation or any instance implementations. | |
module Stop | |
module CantTouchThis | |
def self.included(mod) |
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
module Stop | |
module CantTouchThis | |
def self.included(mod) | |
%w[instance_variable_get instance_variable_set].each do |m| | |
send(:protected, m) | |
end | |
eigenclass = class << mod; self; end | |
%w[const_set class_variable_get class_variable_set public_class_method attr attr_reader attr_writer].each do |m| |
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
module MockSnowflake | |
TWEPOCH = 1142974214000 | |
WORKERIDBITS = 5 | |
DATACENTERIDBITS = 5 | |
MAXWORKERID = -1 ^ (-1 << WORKERIDBITS) | |
SEQUENCEBITS = 12 | |
WORKERIDSHIFT = SEQUENCEBITS | |
DATACENTERIDSHIFT = SEQUENCEBITS + WORKERIDBITS | |
TIMESTAMPLEFTSHIFT = SEQUENCEBITS + WORKERIDBITS + DATACENTERIDBITS |
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
["batch_mutate", | |
CassandraThrift::Cassandra::Batch_mutate_args, | |
{:consistency_level=>1, | |
:mutation_map=> | |
{"test_get_super_sub_keys_with_count_after_remove"=> | |
{"StatusRelationships"=> | |
[<CassandraThrift::Mutation column_or_supercolumn:<CassandraThrift::ColumnOrSuperColumn super_column:<CassandraThrift::SuperColumn name:"user_timelines", columns:[<CassandraThrift::Column name:"\023\201@\000N\377\021\263\216\2351P\3706\220Y", value:"Item 1", timestamp:1270765433751692>, <CassandraThrift::Column name:"\223\201@\000\266h\021\262\214\343i\260U\367kx", value:"Item 0", timestamp:1270765433751692>, <CassandraThrift::Column name:"\023\201@\000\200,\021\264\237\003\323$\217\223S\240", value:"Item 2", timestamp:1270765433751692>]>>>]}}, | |
:keyspace=>"Twitter"}] | |
["remove", | |
CassandraThrift::Cassandra::Remove_args, |
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
diff --git a/lib/cassandra_object/identity/natural_key_factory.rb b/lib/cassandra_object/identity/natural_key_factory.rb | |
index 69dec5b..91859ee 100644 | |
--- a/lib/cassandra_object/identity/natural_key_factory.rb | |
+++ b/lib/cassandra_object/identity/natural_key_factory.rb | |
@@ -35,7 +35,7 @@ module CassandraObject | |
end | |
def next_key(object) | |
- NaturalKey.new(attributes.map { |a| object[a.to_s] }.join(separator)) | |
+ NaturalKey.new(attributes.map { |a| object.attributes[a.to_s] }.join(separator)) |
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
DEBUG - batch_insert | |
DEBUG - insertBlocking writing key 2783412020 to 366568@[127.0.0.1:7000] | |
DEBUG - Applying RowMutation(table='Twitter', key='2783412020', modifications=[ColumnFamily(Statuses [created_at:false:32@1248290653252056, favorited:false:7@1248290653252056, id:false:12@1248290653252056, in_reply_to_screen_name:false:8@1248290653252056, in_reply_to_status_id:false:12@1248290653252056, in_reply_to_user_id:false:10@1248290653252056, source:false:51@1248290653252056, text:false:138@1248290653252056, truncated:false:7@1248290653252056])]) | |
DEBUG - RowMutation(table='Twitter', key='2783412020', modifications=[ColumnFamily(Statuses [created_at:false:32@1248290653252056, favorited:false:7@1248290653252056, id:false:12@1248290653252056, in_reply_to_screen_name:false:8@1248290653252056, in_reply_to_status_id:false:12@1248290653252056, in_reply_to_user_id:false:10@1248290653252056, source:false:51@1248290653252056, text:false:138@1248290653252056, truncated:false:7@1248290653252056])]) applied. Sending respo |
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
strace -cp `ps ax | grep [h]ttpd | awk '{ print $1 }' | tr '\n' ',' | sed 's/,/ -p /g'` -f |