Skip to content

Instantly share code, notes, and snippets.


Anton Kaliaev melekes

View GitHub Profile
melekes /
Last active Aug 29, 2015
Writing to HBase From Hadoop Mapper
public class AvgTemperatureDriver extends Configured implements Tool {
public int run(String[] args) throws Exception {
Job job = new Job(getConf(), "Avg temperature");
Scan scan = new Scan();
melekes / Makefile
Last active Aug 29, 2015
Makefile for erlang projects
View Makefile
.PHONY: all compile deps clean distclean test docs xref dialyzer \
REBAR = `which rebar || ./script/rebar`
all: deps compile
compile: deps
@$(REBAR) compile
melekes / latency.txt
Created Dec 2, 2015 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
View latency.txt
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
melekes / companies.rb
Created Nov 13, 2013
Writing tests using FactoryGirl and validating presence of nested attributes ( P.S. code not tested
View companies.rb
require 'factory_girl'
FactoryGirl.define do
factory :company do
name "Twitter Corp."
before(:create) do |company, evaluator|
offices_attributes = []
3.times do # 3 offices per company
offices_attributes << attributes_for(:office)
melekes /
Last active Aug 11, 2016
How to learn any language in six months | Chris Lonsdale | TEDxLingnanUniversity

Краткое содержание


  1. Фокусируйте внимание на контенте, имеющем для вас какое-то значение
  2. Используйте язык как средство для коммуникации начиная с первого дня
  3. Если вы сначала поймёте то, что вам хотели сказать, то вы начинаете овладевать языком бессознательно (comprehensive input)
  4. Изучение нового языка - это также тренировка тела (правильное произношение зависит от мышц)
melekes / Makefile
Created Mar 21, 2014
Colored Makefile for Golang projects
View Makefile
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
@echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
@go get -d -v ./...
@echo $(DEPS) | xargs -n1 go get -d

Keybase proof

I hereby claim:

  • I am melekes on github.
  • I am melekes ( on keybase.
  • I have a public key ASA1kz6kxvacyRSjua9gxErX7nt2n46FvBFB-OfWYp572go

To claim this, I am signing this object:

View counter.systemd.j2
User={{ user }}
Group={{ group }}
melekes / upgrade_tendermint.yml
Last active Apr 24, 2017
Ansible playbook for upgrading Tendermint
View upgrade_tendermint.yml
- hosts: all
- name: get version
shell: tendermint version
register: version
- name: copy and unpack binary if newer version is being installed
melekes /
Created Aug 30, 2013
Test coverage Dashing widget

Test coverage

Test coverage


Dashing widget to display test coverage.

The widget is based on JenkinsBuild, which shows you a completion percentage while Jenkins builds the project and zero in other cases. Actually, if you think about it, build takes only a small amount of time (of course, if your project is not building for half an hour). So we decided to find a more reasonable use of this state and show percentage of test coverage.