Skip to content

Instantly share code, notes, and snippets.

require 'cgi'
require 'base64'
require 'openssl'
def oauth_url(url)
parameters = ["oauth_consumer_key=#{ENV.fetch 'OAUTH_KEY'}",
"oauth_nonce=#{Random.rand(100000000).to_s}",
"oauth_signature_method=#{'HMAC-SHA1'}",
"oauth_timestamp=#{Time.now.to_i.to_s}",
"oauth_version=1.0"].join('&')
#!/usr/bin/env ruby
require 'securerandom'
require 'json'
require 'benchmark'
require 'bunny'
conn = Bunny.new
conn.start
ch = conn.create_channel
x = ch.default_exchange
@carlhoerberg
carlhoerberg / README.md
Last active February 19, 2018 22:40 — forked from lukebakken/README.md
Restart RabbitMQ TLS acceptors with new settings

Restarting RabbitMQ TLS Listeners with new TLS options

Edit your /etc/rabbitmq/rabbitmq.config and then reload the settings from there with:

sudo rabbitmqctl eval '{ok, [C]} = file:consult("/etc/rabbitmq/rabbitmq.config"), {rabbit, R} = proplists:lookup(rabbit, C), {ssl_options, O} = proplists:lookup(ssl_options, R), application:set_env(rabbit, ssl_options, O).'

Restart the TLS Listener on port 5671