diff --git a/git-conflicts b/git-conflicts new file mode 100755 index 0000000..9f2d907 --- /dev/null +++ b/git-conflicts @@ -0,0 +1,4 @@ +#!/bin/sh +# Usage: git-conflicts +# Show list of files in a conflict state. +git ls-files -u | awk '{print $4}' | sort -u diff --git a/occupy-ram b/occupy-ram new file mode 100755 index 0000000..a04f69c --- /dev/null +++ b/occupy-ram @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby + +def free_pages + `vm_stat`.split(/\n/).grep(/free/).first.scan(/\d+/).first.to_i +end + +mega = 1024 * 1024.0 +a = [] +n = 0 +free = free_pages + +until free < 100_000 + a << '-' * (100 * mega) + n += 100 + free = free_pages + puts "Occupied #{n} MB, #{(4096 * free / mega).round(2)} MB still free" +end +puts 'full, looping forever...' +a.each { |s| s =~ /foo/ } while true