Skip to content

Instantly share code, notes, and snippets.

View dotcypress's full-sized avatar

Vitaly Domnikov dotcypress

View GitHub Profile
@dotcypress
dotcypress / gist:5145593
Created March 12, 2013 18:33
Pretty git log alias
[alias]
hist = log --pretty=format:\"\t%C(red)%h%C(reset)%C(blue)%d%C(reset) : %C(yellow)%ad%C(reset) | %s [%C(green)%an<%ae>%C(reset)]\" --graph --date=short
@dotcypress
dotcypress / gist:4546852
Created January 16, 2013 12:38
Вычисляем PI методом Монте-Карло
%% Вычисляем PI методом Монте-Карло
-module(pi).
-export([calculate/1, parallel_calculate/2, start_worker/2]).
calculate(Hits) ->
Acc = test_hit(Hits, 0),
{ok, 4.0 * Acc / Hits}.
parallel_calculate(Hits, Workers) ->