Skip to content

Instantly share code, notes, and snippets.

@halo
halo / stow.rb
Created August 19, 2025 13:26
Playground for experimenting with different GNU stow scenarios
# 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')
@halo
halo / brainwash
Created February 22, 2014 18:09
A small ruby script to configure internal IP and hostname on Ubuntu
#!/usr/bin/env ruby
require 'ipaddr'
module Brainwash
module Help
extend self
def examples
<<-END
@halo
halo / mole.rb
Last active October 3, 2015 06:57
A small Ruby tool making it easy to establish an SSH tunnel
#!/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