hoodwink.d enhanced
RSS
2.0
XHTML
1.0

RedHanded

Friday

2006.07.21

Hpricot and Sandbox for Win32 #

by why in inspect

Mauricio checked in some Rakefiles for cross-compiling to win32, so I’ve got some win32 gems for Hpricot and the (FF)Sandbox. The majority of you can now:

 gem install hpricot --source code.whytheluckystiff.net
 gem install sandbox --source code.whytheluckystiff.net

THE SANDBOX ONE IS COMPILED FOR 1.8.4 SO IT HAS TOTALLY GOT HOLES. And yet, fun can still be had I’m sure.

Continue to full post. (171 words)

The Standard (Freaky, But Not FreakyFreaky) Sandbox #

by why in inspect

Before I get into how to lock down the sandbox, let’s talk about what kinds of nifty things you can do with it when you’re just running your own code.

 dir_proc = proc { Dir['/*'] }

 require 'sandbox'
 sbox = Sandbox.new
 sbox.eval("Kernel").module_eval do
   define_method(:root_directory) do
     dir_proc.call
   end
 end

Continue to full post. (221 words)