How do dump a Javascript object’s methods

 
for(var i in objectname) {console.log(i);}

How to optimize a Solr index from Sunspot

It doesn’t look like SunSpot has a builtin optimize command.
Here’s one way you can do it:

 
Sunspot.session.session.send(:connection).update RSolr::Message::Generator.new.build { |b| b.optimize }

Anyone know of a simpler one?

Resque

Github’s excellent analysis of the extant background jobs runners and introduction to Resque

Selenium-RC and Snow Leopard

Selenium-RC was having issues on Snow Leopard:

 
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0

Web searches produced a lot of information including some workarounds that didn’t. Finally I read that Selenium-RC 1.x has some hardcoded paths in it that mean it won’t [...]

RubyMine not recognizing cucumber features

If RubyMine isn’t recognizing cucumber features, ensure the following:

Cucumber gem is attached to project: RM | Settings | Ruby SDK and Gems | Attach gems.
If you edited *.feature files in early version of RubyMine it may be mapped on Text file. So you should check that *.feature extension is mapped on “Cucumber scenario files” in [...]

Superstar Developers

Zed Shaw is at it again. This is an excellent post, that contains much truth: 3 Simple Rules That Will Make You a ‘Superstar’ Developer.
Which also provoked a great comment.

Easy rspec matchers

http://rspec.rubyforge.org/rspec/1.2.9/classes/Spec/Matchers.html

Strongbox for ActiveRecord encryption

This looks really handy:
First spotted in a teachmetocode.com screencast.
Which references Spike’s original post.

Google Calendar and iCalendar X-WR-CALNAME

I just figured out another Goggle Calendar idiosyncrasy:
When building an iCalendar (RFC 2445 / RFC 5545) feed, if you want to subscribe to that feed with Google Calendar, and you want to give your calendar a name, Google Calendar accepts the X-WR-CALNAME extension to the iCalendar standard, but it will only allow a text name [...]

Replacing folders with submodules in Git

I recently ran across the following problem:

Multiple people are developing on the same project, pushing commits into the same (e.g. GitHub) repo.
Developer A is working, and commits locally.
Developer B converts a folder into a Git submodule.
Developer A tries to git pull… BOOM – unresolveable conflict, local repo is left in a mess.

The problem is that [...]