Extlib for everyday use...
Looks like a couple of my core enhancements may be reinventing the Extlib wheel, so…
irb(main):002:0> "foo\nbar".compress_lines NoMethodError: compress_lines not defined from /Users/jay/ruby/lib/utility/enhancements.rb:12:in `method_missing' from (irb):2 irb(main):003:0> exit
FAIL. A tweak to DeferredActiveSupport (now DeferredExtensions)…
-module DeferredActiveSupport +module DeferredExtensions def method_missing(method, *arguments, &block) require 'activesupport' + require 'extlib' class String - include DeferredActiveSupport + include DeferredExtensions #And other classes...
And retry:
jay@dandelion:~ $ /Users/jay/Shortcuts/ruby\ shell irb(main):001:0> "foo\nbar".compress_lines => "foo bar"
Yay! I don’t even know everything I’ve gained yet. Time to play around a bit.
Read more...Fun QuickSilver stuff...
Set your Search Mode to “Snap to Best”. That’ll make sure your last selected action jumps to the top for a given subject.
Typing “.” (period) gets you free text entry as the subject. Pretty handy in conjunction with “Run Command in a Shell”.
Read more...Heard this one before, but I have new appreciation for it…
On two occasions I have been asked by members of Parliament, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. --Charles BabbageRead more...
Been waiting for a sign?
Read more...~/bin
OK, just finished porting my toolbox to OS X. I’ve gotten rid of all those dumb text files and generators, as they were really only needed under Windows.
I ported some stuff to take advantage of my Ruby utilities library, and threw out a lot of cruft. Here’s what made the cut…
Read more...