January 2009

A quick Flay task for Rake…

The only other one I saw posted missed parts of the specified subfolders. So here goes:

begin
	require 'flay'
	desc "Run duplicate code analyzer"
	task :flay do
		output = `flay #{FileList["lib/**/*.rb", "app/**/*.rb"].join(' ')}`
		fail "Error #{$?}: #{output}" unless $? == 0
		puts output
	end
rescue LoadError => exception
	warn "Could not load flay - it might not be installed."
end

general

Permalink

This is a test…

To ensure everything is back to a normal state after my attempted WordPress updgrade earlier this evening (morning). Oh, it all worked, but there were some minor glitches that would have taken too long to fix and would have annoyed the crap out of me.

My old install hasn’t been turned into a spammer’s link farm yet, so I’m rolling back, dammit.

general

Permalink

jQuery Hell…

For you, not for me. (I kinda had fun with it.)

click_hide.html

Did this for our MoFoCamp demo tonight in a matter of minutes. Our port of a Tetris clone didn’t go as well (despite having a whole hour to work on that), but we got some practice with with speed JavaScripting. Lotta fun and I want to do it again (different framework next time though).

picture-12.png

development

Permalink

Nice to finally have some representation…

We are a nation of Christians and Muslims, Jews and Hindus - and non-believers.
–Inaugural Address by Barack Obama

And I like this quote from his family histories regarding his upbringing:

…my mother viewed religion through the eyes of the anthropologist she would become; it was a phenomenon to be treated with a suitable respect, but with a suitable detachment as well.

general

Permalink

grin.gif

general

Permalink

History…

…sponsored by Paul Blart, Mall Cop.

picture-11.png

general

Permalink

The Merb workout begins…

picture-10.png

At this point I’m raising my eyebrows far less often than I did with Rails. It’s just easier to grok.

development
ruby

Permalink

Yay for plug-n-play Honda parts!

0109091607.jpg0115091802.jpg

Not happy with the $100 price tag, but it arrived in the mail and I just popped it in. Not bad.

general

Permalink

XScreensaver OS X…

The OS X port of XScreensaver is simple, stable, and unobtrusive as far as I can tell. Unfortunately you can’t (easily) pipe program output into Phosphor and other textual screen savers, but other than that they’re spectacular.

I did toss out some of the less impressive ones, though. Here’s what I kept installed:

Continue Reading »

applications
osx

Permalink

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.

general

Permalink