Skip to content

Instantly share code, notes, and snippets.

@the-michael-toy
the-michael-toy / makebigfakerubyapp.rb
Created October 31, 2016 23:08
create a big fake ruby project for testing purposes ...
# ruby makebigfakerubyapp.rb /tmp/bfrp
# cd /tmp/bfrp
# time bin/require_everything
# warble
# time java -jar require_everything.jar
require 'securerandom'
require 'fileutils'
require 'set'
@the-michael-toy
the-michael-toy / every_git_status.rb
Last active December 15, 2015 15:41
Try to create every possible state reportable by git-staus
# This tries to produce a git repository with a file in every possible state that git-status
# could return. A "remote" and "user" repostories are created with initially identical contents
# and then series of operations are performed to leave the user repository in a state where
# git-status reports one of each possible status.
#
# Note: As of now, I can only reproduce 17 of the 24 possible states.
require 'fileutils'
require 'securerandom'
require 'shellwords'