Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ifarkas on github.
  • I am ifarkas (https://keybase.io/ifarkas) on keybase.
  • I have a public key ASBshvcIpOrM2NtJ7rpCmsA36FUDM_RUvWVUsfdMpXZV8Ao

To claim this, I am signing this object:

@ifarkas
ifarkas / gitlab
Created December 16, 2012 16:40
Gitlab init file without unicorn
#! /bin/bash
# GITLAB
# Maintainer: @randx
# App Version: 3.0
### BEGIN INIT INFO
# Provides: gitlab
# Required-Start: $local_fs $remote_fs $network $syslog redis-server
# Required-Stop: $local_fs $remote_fs $network $syslog
@ifarkas
ifarkas / probability_distribution_test.rb
Created August 17, 2012 09:14
Probability distribution of continuous stream of random numbers vs probability distribution of sporadic picks of a continuous stream of random numbers
EXPERIMENTS_COUNT = 100000
PICKED_MATCH_COUNT = 5
DISREGARD_PICK_PROBABILITY = 0.26
pg = ProviderSelection::PriorityGroup.new(0)
pg.matches << ProviderSelection::Match.new(nil, -100)
pg.matches << ProviderSelection::Match.new(nil, 0)
# Continuous stream of random numbers
result_continuous = []
@ifarkas
ifarkas / rcov_manual_test.sh
Created September 1, 2011 10:25
Command to get code coverage from rcov during manual testing
rcov --save -o manual_test_coverage -x /.rvm/ script/rails -- server -b 0.0.0.0 -p 3000 -e development