Skip to content

Instantly share code, notes, and snippets.

View blinkov's full-sized avatar

Ivan Blinkov blinkov

View GitHub Profile
@RJ
RJ / fake-erlang.sh
Last active April 5, 2018 13:13
Use ESL erlang deb, provide fake erlang-nox package so deps behave
#!/bin/bash
# Install fake erlang packages, then the ESL package
# Afterwards, installing packages that depend on erlang, like rabbitmq,
# will use the ESL packaged erlang without installing the older disto ones
#
apt-get install equivs
# Create fake erlang packages, since we are using esl-erlang instead
cd /tmp
apt-get install -y equivs
@jboner
jboner / latency.txt
Last active November 16, 2024 21:28
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@benmmurphy
benmmurphy / riak_stats.sh
Created November 13, 2012 09:48
riak -> librato stats cron job
#!/bin/bash
# * * * * * root /path/to/riak_stats.sh
set -e
SOURCE=$(hostname)
LIBRATO_USERID=""
LIBRATO_TOKEN=""
PREFIX="test.riak"
@benmmurphy
benmmurphy / riak_graphite_stats.sh
Last active October 12, 2015 17:57
riak -> graphite stats cron job
#!/bin/bash
# * * * * * root /path/to/riak_graphite_stats.sh
set -e
SOURCE=$(hostname)
GRAPHITE_PORT=2003
GRAPHITE_SERVER="server"
PREFIX="riak_stats"
STATUS=$(/usr/sbin/riak-admin status)