Skip to content

Instantly share code, notes, and snippets.

View hash_to_html.rb
class Hash
def to_html
[
'<ul>',
map { |k, v| ["<li><strong>#{k}</strong>", v.respond_to?(:to_html) ? v.to_html : "<span>#{v}</span></li>"] },
'</ul>'
].join
end
end
@robhurring
robhurring / entourage_email_script.rb
Created Nov 22, 2010
Ruby shell script to create Entourage emails from the command line - http://proccli.com/send-entourage-mails-command-line-ruby
View entourage_email_script.rb
#!/usr/local/bin/ruby
# Mail script for sending stuff from the command line through entourage
# which makes life super easy for sending files, or piping files to a mail body, etc.
#
# email -t bosses -c tracker -a ~/report.csv <SUBJECT HERE>
#
# Author:: Rob Hurring
# Date:: 2011-11-15
# Version:: 1.0a