Skip to content

Instantly share code, notes, and snippets.

View stephanvd's full-sized avatar

Stephan van Diepen stephanvd

View GitHub Profile

Keybase proof

I hereby claim:

  • I am stephanvd on github.
  • I am svd (https://keybase.io/svd) on keybase.
  • I have a public key whose fingerprint is DD69 3CE3 8551 30CD 382A BBDB C507 6F01 79CB 35AC

To claim this, I am signing this object:

@stephanvd
stephanvd / Rakefile
Created February 23, 2016 14:00
CodeCov setup for parallel_test gem
namespace :codecov do
desc 'Uploads the latest simplecov result set to codecov.io'
task upload: :environment do
require 'simplecov'
require 'codecov'
formatter = SimpleCov::Formatter::Codecov.new
formatter.format(SimpleCov::ResultMerger.merged_result)
end
end
@stephanvd
stephanvd / multifact_sum_aggregator.js
Created October 31, 2013 09:33
Aggregate over multiple fact fields. Result looks like this: http://imgur.com/fI636rq The aggregator returns first field for renderers without multifield support. The renderer is a modified version of the built-in table to support multifield. Quick and dirty but it gets the job done. For https://github.com/nicolaskruchten/pivottable.
multifactSumAggregator = function() {
return function(facts) {
return function() {
var summedFacts = {};
for (_i = 0, _len = facts.length; _i < _len; _i++) {
summedFacts[facts[_i]] = 0
}