I hereby claim:
- I am grantr on github.
- I am grantr (https://keybase.io/grantr) on keybase.
- I have a public key ASAJ-N6ihtij2BAlmB2DPy4dvJGOh2A4xz7MDMjXzL5DZwo
To claim this, I am signing this object:
MRI 1.9.3-p125 | |
==== Ruby standard logger ==== | |
Calculating ------------------------------------- | |
standard 3361 i/100ms | |
------------------------------------------------- | |
standard 35759.4 (±5.5%) i/s - 181494 in 5.090712s | |
==== below level ==== | |
Calculating ------------------------------------- | |
below level 47480 i/100ms |
require 'celluloid' | |
module Celluloid | |
class RingManager | |
include Celluloid | |
trap_exit :crash_handler | |
def initialize(worker_class, options = {}) | |
@size = options[:size] || [Celluloid.cores, 2].max | |
raise ArgumentError, "minimum ring size is 2" if @size < 2 |
require 'ffi-rzmq' | |
class Event | |
class Layout < FFI::Struct | |
layout :event, :int, | |
:data, ZMQ::LibZMQ::EventData | |
end | |
def initialize(msg) | |
@data = Layout.new(msg.data) |
>> require 'celluloid/zmq' | |
=> true | |
>> socket = Celluloid::ZMQ::DealerSocket.new | |
=> #<Celluloid::ZMQ::DealerSocket:0x00000001d7d470> | |
>> m = Celluloid::ZMQ::SocketMonitor.new(socket, "socket.monitor") | |
=> #<Celluloid::ZMQ::SocketMonitor:0x00000001bbf9d0 @socket=#<Celluloid::ZMQ::DealerSocket:0x00000001d7d470>, @topic="socket.monitor", @flags=1023, @listener=#<Celluloid::ZMQ::PairSocket:0x00000001bbf980>> | |
>> m.terminate | |
NoMethodError: undefined method `terminate' for #<Celluloid::ZMQ::SocketMonitor:0x00000001bbf9d0> | |
from (irb):4 | |
from /home/grantr/.rbenv/versions/1.9.3-p362/bin/irb:12:in `<main>' |
>> require 'zensu' | |
=> true | |
>> Zensu::Client::App.run!; nil | |
=> nil | |
>> Zensu.config.servers = ["tcp://127.0.0.1:58000"] | |
=> ["tcp://127.0.0.1:58000"] | |
>> D, [2013-01-11T14:08:30.692941 #7480] DEBUG -- default: got connect_delayed socket event: event [2], addr [tcp://127.0.0.1:58000], fd [115], field2 [115] | |
D, [2013-01-11T14:08:30.694223 #7480] DEBUG -- default: got connected socket event: event [1], addr [tcp://127.0.0.1:58000], fd [19], field2 [19] | |
I, [2013-01-11T14:08:32.152452 #7480] INFO -- default: 76711953-fa99-4586-8520-000000050000 up | |
D, [2013-01-11T14:09:37.599686 #7480] DEBUG -- default: handled broadcast: zensu.broadcast.topic hello clients |
>> require 'ffi-rzmq' | |
=> true | |
>> ctx = ZMQ::Context.new | |
=> #<ZMQ::Context:0x00000001ae9d30 @io_threads=1, @max_sockets=1024, @context=#<FFI::Pointer address=0x00000001c46690>> | |
>> r1 = ctx.socket(ZMQ::ROUTER) | |
=> #<ZMQ::Socket:0x00000001b05170 @receiver_klass=ZMQ::Message, @socket=#<FFI::Pointer address=0x00000001e44e00>, @name="ROUTER", @int_cache=nil, @longlong_cache=nil, @more_parts_array=[], @option_lookup=[nil, nil, nil, nil, 1, 2, 2, 2, 0, 0, nil, 0, 0, 1, 0, 0, 0, 0, 0, 0, nil, 0, 1, 0, 0, nil, nil, 0, 0, nil, nil, 0, nil, 0, 0, 0, 0, 0, 0]> | |
>> r2 = ctx.socket(ZMQ::ROUTER) | |
=> #<ZMQ::Socket:0x00000001b074e8 @receiver_klass=ZMQ::Message, @socket=#<FFI::Pointer address=0x00000001cbbe20>, @name="ROUTER", @int_cache=nil, @longlong_cache=nil, @more_parts_array=[], @option_lookup=[nil, nil, nil, nil, 1, 2, 2, 2, 0, 0, nil, 0, 0, 1, 0, 0, 0, 0, 0, 0, nil, 0, 1, 0, 0, nil, nil, 0, 0, nil, nil, 0, nil, 0, 0, 0, 0, 0, 0]> | |
>> r1.setsockopt(ZMQ::IDENTITY, "r1") | |
=> 0 |
RSpec.configure do |config| | |
# terminate actors created during tests | |
config.before(:each) do | |
@running_actors = Celluloid::Actor.all | |
end | |
config.after(:each) do | |
new_actors = Celluloid::Actor.all - @running_actors | |
new_actors.each { |a| a.terminate if a.alive? } | |
end |
I hereby claim:
To claim this, I am signing this object:
# Step 1: gem install thor | |
# Step 2: thor ssl:generate_ca && thor ssl:generate_cert | |
require 'thor' | |
require 'securerandom' | |
class SSL < Thor | |
desc "generate_ca", "Generate a Root CA" | |
method_option :name, type: :string, desc: "Common name" |
# A demonstration of the CurveCP handshake protocol. This protocol has many | |
# favorable security properties described at http://curvecp.org. | |
# | |
# In addition to its security advantages, it has the following favorable properties: | |
# * Needs only 2 messages (1 from client, 1 from server) before application | |
# messages can be exchanged (3 before the server can send application messages) | |
# * Does not require the server to keep protocol state between handshake messages. | |
# | |
# An overview of the protocol: | |
# |