Skip to content

Instantly share code, notes, and snippets.

View melekes's full-sized avatar

Anton Kaliaev melekes

View GitHub Profile
@melekes
melekes / talks.md
Last active December 27, 2019 08:22
The list of my favorite talks.
@melekes
melekes / README.md
Created August 30, 2013 08:51
Yet another Google Calendar Dashing widget

Yet another Google Calendar Dashing widget

Yet another Google Calendar Dashing widget

Description

Dashing widget to display first two coming-up Google Calendar events.

Basically, you do not need more than two events on your dashboard, but it can be easily extended to the neighboring cells and show, say, 4 events instead of 2.

@melekes
melekes / README.md
Created August 30, 2013 16:06
Test coverage Dashing widget

Test coverage

Test coverage

Description

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.

@melekes
melekes / README.md
Last active February 22, 2022 13:07
Wavegirls Dashing widget

Wavegirls

Wavegirls

Description

Dashing widget to display random girls. Check out this video to see how it works.

Installation

@melekes
melekes / README.md
Created August 31, 2013 11:07
Music Player Dashing widget

Music Player

Music Player

Description

Dashing widget to play music. Awesome, right?!

A bit of a history. When we installed the Github's hubot, one of the things we were really miss was playing songs inside our room (not the whole office). The guys from Github have written play, but we just couldn't setup it (we didn't have Mac Mini at that moment - our CI monitors were backed by Ubuntu). So we started looking for another way out and decided to write Dashing widget and control it via hubot.

@melekes
melekes / README.md
Last active August 8, 2018 05:19
Youtube Dashing widget

Youtube

Description

Dashing widget to play video from Youtube.

Installation

  1. Install Youtube widget
@melekes
melekes / companies.rb
Created November 13, 2013 15:05
Writing tests using FactoryGirl and validating presence of nested attributes (http://homeonrails.com/2012/10/validating-nested-associations-in-rails/) P.S. code not tested
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
melekes / Makefile
Created March 21, 2014 09:34
Colored Makefile for Golang projects
NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
deps:
@echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
@go get -d -v ./...
@echo $(DEPS) | xargs -n1 go get -d
@melekes
melekes / AvgTemperatureDriver.java
Last active August 29, 2015 14:13
Writing to HBase From Hadoop Mapper
public class AvgTemperatureDriver extends Configured implements Tool {
@Override
public int run(String[] args) throws Exception {
Job job = new Job(getConf(), "Avg temperature");
job.setJarByClass(getClass());
job.setNumReduceTasks(0);
Scan scan = new Scan();
@melekes
melekes / Makefile
Last active August 29, 2015 14:15
Makefile for erlang projects
.PHONY: all compile deps clean distclean test docs xref dialyzer \
cleanplt
REBAR = `which rebar || ./script/rebar`
all: deps compile
compile: deps
@$(REBAR) compile