This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You need stow on your system for this demonstration. | |
# E.g. `brew install stow` | |
# Then run this file with `ruby stow.rb` | |
require 'fileutils' | |
# Up here are just helper methods for readability | |
def cleanup | |
FileUtils.rm_rf('/tmp/home') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'ipaddr' | |
module Brainwash | |
module Help | |
extend self | |
def examples | |
<<-END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'ostruct' | |
# Extension for colored Strings | |
class String | |
def red() colored(:red); end | |
def green() colored(:green); end | |
def yellow() colored(:yellow); end | |
def blue() colored(:blue); end |