Archive for November, 2009

My First Arduino Sketch

Saturday, November 21st, 2009

I got my arduino and chumby guts from makershed.com this week.

Arduino and Chumby Guts Boxen

I unboxed them and thought about what to do with them.
Chumby Guts

My chumby guts needs an enclosure, something I am going to wait until I have access to power tools perhaps.

But the arduino provided immediate gratification. Who knew embedded programming could be so easy.

My first arduino sketch (can you guess what it says?):

Things I’ve Forgotten

Saturday, November 14th, 2009

I was googling myself today(That’s normal, right?) and came across my old blogger accounts from when I was in Japan and before.

http://bizcomcult.blogspot.com/ — Musing about multicultural communication etc. I started this while in a class taught be Garr Reynolds, better known as the writer of Presentation Zen.

http://baroquebobcat.blogspot.com/ — my first blog ever, and definitely baroque in some of its sentence structures, stylings. It clearly didn’t last very long, unlike the baroque period, which lasted from the late 16th century through the early 18th(thank you wikipedia).

Some of what I’ve written is rather cringe-worthy, but it is interesting to look back at  it and remember those heady days, playing Starcraft with exchange students, surrounded by Japan. Or, reflecting on my kendo miscommunications.

Usdo. Misspellings turn into gem-fu practice

Saturday, November 14th, 2009

Indian Paintbrush
A few weeks ago, during a period of frustration, I found myself repeatedly mistyping ‘sudo.’ So, in a fit of silliness I wrote a short script to insult me when I did it, and put it in the path.

Later, I packaged it as a gem, because a) I had never built a gem with an executable and b) gems are a great way to share things.

The end result?

http://github.com/baroquebobcat/usdo

It isn’t particularly smart, but I happen to find it funny. It also showed to me how far gem packaging has come. Gemcutter and Jeweler make building and distributing ruby gems freakishly easy. This is especially awesome in light of the recent announcement that gemcutter is going to be the default gems host(though at rubygems.org)

How I put it together

I ran jeweler to create the default directory structure and added a bin dir to it, for the files I wanted to end up in the path.

$ jeweler usdo
cd usdo
mkdir bin

I put my gist from before in the bin directory, and set up git.

Set up my gem info in my Rakefile

#...
Jeweler::Tasks.new do |gem|
  gem.name = "usdo"
  gem.summary = %Q{adds usdo command to ridicule mispellings of sudo}
  gem.description = %Q{...}
  gem.email = "ndh@baroquebobcat.com"
  gem.homepage = "http://github.com/baroquebobcat/usdo"
  gem.authors = ["Nick Howard"]
end

then did the jeweler gem initialization dance

rake version:write
rake gemspec
rake install

Testing it out:

$ usdo -l
----USDO----
    You mispelled sudo
    You can't do anything, you can't even spell sudo
    are you really sure you want to try running
    'sudo -l'????

Now that was working, to send it up for distribution.

Jeweler is awesome and now has gemcutter support. I followed the jeweler README‘s directions on uploading to gemcutter. Which makes pushing your gem as simple as

$ rake gemcutter:release

Awesome.

Check out my code if you want.

I loves me some music geeks

Thursday, November 12th, 2009

I saw OK Go last night at the Canopy Club. The show was a blast. The songs were awesome, fucking loud; there was much kick assery to be had. My favorite moments though, were the silly ones.

On Conductors and Directors

Monday, November 9th, 2009

This reminded me of all the time I spent in Howard Hall, practicing music and listening to music majors talk about their work.

Scrubyt On A Server Workaround

Wednesday, November 4th, 2009

So you got some awesome scraper script and you want to deploy it to your server but you don’t want to have to install firewatir. Or, you don’t want to pull in the firewatir gem because you are not planning on using it. Whatever.

Problem: scrubyt
requires the firewatir gem

Hacky Solution: comment out the require

But where you ask?

/lib/scrubyt/core/navigation/agents/firewatir.rb line 1

This works on the current rubyforge version(0.4.1).
Recommended: Or, you could just use the version on github that is fixed(see commit)

grab the files via git or archive from github.com/scrubber/scrubyt

then

cd scrubyt-somehash
rake gem
gem install pkg/scrubyt-0.4.26.gem

Not as nice as using jeweler where you can just `rake install` it, but pretty nifty none the less.