Tuesday, April 17, 2007

X11 tunneling via SSH in OSX

-X isn't enough for the ssh args in OSX according to this post. So, "ssh -XY hoser@remotebox" worked just great when remoting in to a Suse server and firing executing fvwm.

Thursday, April 12, 2007

1024 vs 2048 RSA encryption/decryption fun in Ruby

Using Tobias's handy openssl wrapper I decided to run a couple timing tests to see how well Ruby's openssl implementation performed in encrypting/decrypting a set of 1000 identical messages, with 1024 bit and 2048 bit keys. Nothing scientific about this, just three runs of the script on my MacBook Pro (2.33 GHZ, 1G RAM).

Encrypted text: "This is a much longer message since than what I intend to encrypt"

Encryption results, avg time
1024: 0.000300691s
2048: 0.001010027s

Decryption results, avg time
1024: 0.005472064s
2048: 0.035524023s

Pick your poison.

Monday, April 02, 2007

One last hitch

According to this, friendly errors such as

/opt/local/lib/ruby/gems/1.8/gems/soap4r- `class_schema_variable': undefined method `class_variables' for nil:NilClass (NoMethodError)
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `schema_ns_definition'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `schema_definition_classdef'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `schema_definition_from_class'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `any2soap'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `obj2soap'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `stubobj2soap'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `each'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `stubobj2soap'
... 15 levels...
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `call'
from /opt/local/lib/ruby/gems/1.8/gems/soap4r- `call'
from (eval):6:in `search'

prohibit the following default generated objects from correctly mapping when invoking the NetSuite searches:

  • OpportunitySearchBasic

  • EmployeeSearchBasic

  • PartnerSearchBasic

  • ItemSearchBasic

  • TimeBillSearchBasic

Each of which contain an entity named 'class', and while soap4r intelligently generates an attribute 'v_class', it also erroneously generates accessor methods that override Object.class. Big woops. Extremely easy fix just by renaming those methods.