Skip to content

Instantly share code, notes, and snippets.

@rurounijones
rurounijones / ruby_2_1_0
Created May 20, 2014
Core dump Ruby 2.1.0
View ruby_2_1_0
2.1.0 :001 > Marshal.dump(Queue.new)
(irb):1: [BUG] Segmentation fault at 0x00000000000018
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0019 p:---- s:0076 e:000075 CFUNC :dump
c:0018 p:0020 s:0072 e:000071 EVAL (irb):1 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC :eval
c:0016 p:0024 s:0063 e:000062 METHOD /home/jjones/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /home/jjones/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/irb/context.rb:380
@rurounijones
rurounijones / ruby_2_1_1
Created May 20, 2014
Core dump Ruby 2.1.1
View ruby_2_1_1
(irb):1: [BUG] Segmentation fault at 0x00000000000018
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0019 p:---- s:0076 e:000075 CFUNC :dump
c:0018 p:0020 s:0072 e:000071 EVAL (irb):1 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC :eval
c:0016 p:0024 s:0063 e:000062 METHOD /home/jjones/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /home/jjones/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb/context.rb:380
c:0014 p:0022 s:0050 e:000049 BLOCK /home/jjones/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/irb.rb:492
@rurounijones
rurounijones / ruby_2_1_2
Created May 20, 2014
Core dump Ruby 2.1.2
View ruby_2_1_2
2.1.2 :001 > Marshal.dump(Queue.new)
(irb):1: [BUG] Segmentation fault at 0x00000000000018
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0019 p:---- s:0076 e:000075 CFUNC :dump
c:0018 p:0020 s:0072 e:000071 EVAL (irb):1 [FINISH]
c:0017 p:---- s:0070 e:000069 CFUNC :eval
c:0016 p:0024 s:0063 e:000062 METHOD /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/irb/workspace.rb:86
c:0015 p:0025 s:0056 e:000054 METHOD /home/jjones/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/irb/context.rb:380
View gist:1b14e6c2e4d894ee7952
cassandra-cli
[default@unknown] CREATE KEYSPACE ankusa_test with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:1};
9c65cd2b-93bf-3fe0-bb15-a5472c18159c
Waiting for schema agreement...
... schemas agree across the cluster
rake test_cassandra
/home/jjones/.rvm/rubies/ruby-2.1.2/bin/ruby -I"lib:lib:." -I"/home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/rake-10.3.2/lib" "/home/jjones/.rvm/gems/ruby-2.1.2@ankusa/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "test/hasher_test.rb" "test/cassandra_classifier_test.rb"
Run options:
@rurounijones
rurounijones / Committee.rb
Created Jun 7, 2009 — forked from be9/acl9_query_by_role.rb
Using method_missing to dynamically create subject listing for objects based on role
View Committee.rb
class DynamicFinderMatch
attr_accessor :attribute
def initialize(method_sym)
if Role.all(:select => 'name').map{|n| n.name.pluralize}.include?(method_sym.to_s)
@attribute = method_sym
end
end
def match?
@attribute != nil
View rcov.rake
begin
require 'cucumber/rake/task'
require 'rspec/rails'
require 'rspec/core/rake_task'
desc 'Run both specs and features to generate aggregated coverage'
task :rcov => 'rcov:all'
namespace :rcov do
def rcov_opts
View exam_group.rb
Exam Columns (0.7ms) SHOW FIELDS FROM `exams`
Subject Load (0.1ms) SELECT * FROM `subjects` WHERE (`subjects`.`id` = 11 AND (`subjects`.`is_deleted` = 0))
ActionView::TemplateError (undefined method `_delete' for #<Exam:0xb6c53be8>) on line #69 of app/views/exam/_exam_marks_form.rhtml:
66: <td class="col-1">
67: <div class="label-field-pair2">
68: <div class="text-input-bg2">
69: <%= exam_form.check_box :_delete %>
70: </div>
71: </div>
View Output
$ ruby test.rb
Parent (after_initialize):
Parent (Outside object): #<Template:0x7f91a16d3078>
View Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.0.rc1'
# General Purpose gems
gem 'dragonfly', '~>0.9.2'
gem 'rack-cache', :require => 'rack/cache'
gem 'nokogiri', '~>1.5.0.beta.4'
# Torquebox related gems
View Error
2011-07-11 09:50:31,258 WARN [org.hornetq.core.server.impl.QueueImpl] (Thread-18 (group:HornetQ-server-threads1709454628-1591635196)) removing consumer which did not handle a message, consumer=org.hornetq.core.server.cluster.impl.BridgeImpl@567df41c, message=Reference[6442452614]:RELIABLE: java.lang.NullPointerException
at org.hornetq.core.buffers.impl.ResetLimitWrappedHornetQBuffer.<init>(ResetLimitWrappedHornetQBuffer.java:39) [:6.0.0.Final]
at org.hornetq.core.message.impl.MessageImpl.getBodyBuffer(MessageImpl.java:254) [:6.0.0.Final]
at org.hornetq.core.client.impl.ClientProducerImpl.doSend(ClientProducerImpl.java:220) [:6.0.0.Final]
at org.hornetq.core.client.impl.ClientProducerImpl.send(ClientProducerImpl.java:139) [:6.0.0.Final]
at org.hornetq.core.server.cluster.impl.BridgeImpl.handle(BridgeImpl.java:477) [:6.0.0.Final]
at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:1384) [:6.0.0.Final]
at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1175) [:6.0.0.Final]
at o
You can’t perform that action at this time.