Skip to content

Instantly share code, notes, and snippets.

Konstantin Shabanov etehtsea

Block or report user

Report or block etehtsea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View check.rb
require 'benchmark/ips'
require 'monitor'
class MonitorCounter
def initialize
@counter = 0
# No idea why this doesn't work inside the class declaration
extend(MonitorMixin)
end
View repro.rb
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'activerecord', '4.2.4'
gem 'sqlite3'
end
require 'active_record'
require 'minitest/autorun'
@etehtsea
etehtsea / Gemfile
Last active Aug 29, 2015 — forked from aishfenton/serializer_benchmarks.rb
Performance comparison of different ruby serializer methods
View Gemfile
source 'https://rubygems.org'
gem 'benchmark-ips'
gem 'msgpack'
gem 'yajl-ruby', platforms: :ruby
gem 'oj', platforms: :ruby
gem 'jrjackson', platforms: :jruby
gem 'gson', platforms: :jruby
@etehtsea
etehtsea / Gemfile
Created Feb 7, 2014
grape-options-issue
View Gemfile
source 'https://rubygems.org'
gem 'pry'
gem 'grape', github: 'intridea/grape'
View gist:7193889
require 'active_support/notifications'
ActiveSupport::Notifications.subscribe 'test_class.create' do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
p event.payload
end
class TestClass
def initialize
@rand_int = rand(10)
View gist:5387326
Rubinius Crash Report #rbxcrashreport
Error: signal ^@SIGSEGV
[[Backtrace]]
rbx[0x590270]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fd4ffab2cb0]
/lib/x86_64-linux-gnu/libc.so.6(+0x8754a)[0x7fd4ff25954a]
/lib/x86_64-linux-gnu/libnss_dns.so.2(+0x3c16)[0x7fd4d1d99c16]
/lib/x86_64-linux-gnu/libc.so.6(+0xcbc9a)[0x7fd4ff29dc9a]
/lib/x86_64-linux-gnu/libc.so.6(getaddrinfo+0xde)[0x7fd4ff2a098e]
View gist:5305340
2013-04-03T20:55:19Z 12393 TID-2o44 Izi::Worker::ImageConverter JID-a8bc9ddeb26f4430515c703c INFO: Uploading image file to S3: 'ff1e3480-13c9-45c7-9463-86d195416a66/92790ae8-e703-4b29-beba-d026596db05d_480x360.jpg'
Invalid handle usage detected!
handle: 0x2da6880
checksum: 0x0
references: 1
type: 0
object: 0
Abort!
rbx(_ZN8rubinius5abortEv+0x29) [0x599549]
View rackup
Rubinius Crash Report #rbxcrashreport
Error: signal SIGSEGV
[[Backtrace]]
ruby[0x5b7820]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f1ad2f38cb0]
ruby(_ZN8rubinius12ObjectMemory31new_object_typed_enduring_dirtyEPNS_5StateEPNS_5ClassEmNS_11object_typeE+0x88)[0x680158]
ruby(_ZN8rubinius2VM22new_object_typed_dirtyEPNS_5ClassEmNS_11object_typeE+0xff)[0x6b55ef]
ruby(_ZN8rubinius2VM16new_object_typedEPNS_5ClassEmNS_11object_typeE+0x18)[0x6b5638]
You can’t perform that action at this time.