Skip to content

Instantly share code, notes, and snippets.

View michaelklishin's full-sized avatar

Michael Klishin michaelklishin

View GitHub Profile
it "should be able to add a format" do
ru_format = {:ru =>
{ :number => {
:precision => 2,
:delimiter => ' ',
:separator => ','
},
:currency => {
:unit => 'р.',
:format => '%n %u',
@michaelklishin
michaelklishin / gist:2046014
Created March 15, 2012 18:54 — forked from akitaonrails/gist:1724673
Fixing Apachebench on OS X Lion
# If you're getting this error trying to use ApacheBench on OS X Lion:
# Benchmarking mwmanning.com (be patient)...apr_socket_recv: Connection reset by peer (54)
#
# You need to download the latest beta version of Apache and rebuild ab.
# Here's how (assuming you have homebrew installed).
# Install Homebrew (https://github.com/mxcl/homebrew) and then the Perl Regex support
brew install pcre
# Download the latest from http://httpd.apache.org/download.cgi, then decompress and compile it
@michaelklishin
michaelklishin / mysql.js
Created June 6, 2012 05:27 — forked from ciberch/mysql.js
Activity Query with Relational DB
// no, node.js does not suffer from the callback spaghetti. Never.
Bug
.select('createdAt', 'creatorId', 'name', 'url', 'description')
.page(0, 10)
.order('createdAt DESC')
.all(function(err, bugs) {
Commit
.select('createdAt', 'creatorId', 'name', 'url', 'description')
.page(0, 10)
.order('createdAt DESC')
@michaelklishin
michaelklishin / latency.txt
Created June 19, 2012 00:13 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms

RabbitMQ team is proud to announce that starting from the version 3.7.0 RabbitMQ will come with the new command line tools, known as rabbitmqctl.

The reasoning behind this change is that in previous versions rabbitmqctl was deeply integrated into server code, which made it hard to implement new commands, extend and modify existing commands.

The tools is written on [Elixir][elixir] programming language. This will make it easier for people new to erlang to start extending the tools. Although after built, the tools don't require Elixir to be installed.

Dear RabbitMQ community,

We have an update on Erlang/OTP 20 and RabbitMQ compatibility.

First, let's clarify when OTP 20 support will be available: RabbitMQ versions before 3.6.11 will not work correctly with OTP-20.

What's the risk of upgrading from 19.x to 20 on an unsupported version? When upgrading from OTP-19.x(or earlier) to OTP-20 all the persistent data will be permanently lost!

The RabbitMQ team has been looking at the performance differences between the latest RMQ releases. After benchmarking multiple RabbitMQ version/Erlang version/build environment permutations, we have some findings to share.

The new management plugin and stats emission/collection implementation in RabbitMQ 3.6.7 produces a slight drop in performance in some workloads.

Another finding suggests that RabbitMQ packages compiled in Erlang R16B03 (such as the 3.6.x releases produced by our team) will have a minor throughput drop when running on Erlang 20.x. Packages built on Erlang 19.x.x and ran on Erlang 20.x.x showed no such difference.