Skip to content

Instantly share code, notes, and snippets.

@ritalin
Created October 4, 2011 14:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ritalin/1261757 to your computer and use it in GitHub Desktop.
Save ritalin/1261757 to your computer and use it in GitHub Desktop.
Homwbrew on the web
require 'rubygems'
require 'sinatra'
require "stringio"
$LOAD_PATH.push "/usr/local/Library/Homebrew"
require "global"
require "cmd/list"
get '/' do
stream = StringIO.new
$stdout = stream
Homebrew.send "list"
return stream.string
end
module Kernel
def exec(program, *args)
arg = args.join(' ')
puts `#{program} #{arg}`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment