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
[ryan@MBP Desktop]$ git clone git://github.com/nex3/haml.git | |
Initialized empty Git repository in /Users/ryan/Desktop/haml/.git/ | |
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates. | |
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates. | |
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates. | |
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates. | |
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates. | |
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates. | |
remote: error: object di |
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
# put this in .irbrc and you can open the files that define constants | |
def mate mod | |
file = ActiveSupport::Dependencies.search_for_file(ActiveSupport::Dependencies.qualified_name_for(Kernel, mod).underscore) | |
`mate #{file}` | |
nil | |
end |
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
select table_name, column_name, column_key from columns where table_schema='YOURDB' and column_name like '%id' and column_key=''; |
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 |
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
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
["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
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
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
# 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) |
OlderNewer