Skip to content

Instantly share code, notes, and snippets.

@ediweissmann
ediweissmann / big_file.rb
Created February 3, 2013 15:14
Find big files in git repository. Usage: ruby big_file.rb [rev] [size in MB] $ ruby big_file.rb master 0.3
#!/usr/bin/env ruby -w
head, treshold = ARGV
head ||= 'HEAD'
Megabyte = 1000 ** 2
treshold = (treshold || 0.1).to_f * Megabyte
big_files = {}
IO.popen("git rev-list #{head}", 'r') do |rev_list|
rev_list.each_line do |commit|
{
"defaultAction": "SCMP_ACT_ERRNO",
"syscalls": [
{
"name": "accept",
"action": "SCMP_ACT_ALLOW",
"args": null
},
{
"name": "accept4",