Oct25

Emacs ACK Mode

emacs ack | comments

In playing with migrating to Emacs from TextMate one of the things I missed was the Ack plugin for textmate.

After searching for a mode for Emacs that would give me the same power, I found a couple simple Ack modes that worked with varying success.

Continue reading »

Oct21

Emacs JS2 Mode Indentation Fix

emacs javascript | comments

If you use Emacs to code (and manage files, edit images, and browse the web), you are probably aware of the multitude of javascript modes available.

If not, then when you read about programming javascript in Emacs you’ll see references to js-mode, js2-mode, espresso-mode, and more.

Continue reading »

Jul08

PeepOpen

peepopen textmate emacs vim xcode | comments

PeepOpen is a new utility from the man behind Peepcode that gives you a TextMate-like file opening utility (⌘T) but on steroids, and for multiple editors.

Continue reading »

Jun24

RestClient: Soon to handle streaming bodies

restclient ruby | comments

Here’s a little patch I wrote to allow RestClient to stream the HTTP request’s body from a File, Tempfile, StringIO or other IO-like object.

The IO object must respond to #size (or #stat.size), #close, and #read(n)

Continue reading »

Jun21

iOS4 iPod Crashing Fix

ios4 iphone ipod crash | comments

So I upgraded my iPhone 3g to iOS4, and everything looked until I tried to open the iPod. It would open and then crash a few seconds later.

Knowing a thing or two about computers, I rebooted the phone, but it continued to crash.

Continue reading »

Mar12

Rackspace Servers & Ubuntu 9.10 Localhost Troubles

rackspace ubuntu pain localhost postgresql | comments

If you’re using Rackspace Servers to create Ubuntu VPSs then you may be experiencing problems starting services.

I spent a day and a half trying to figure out why PostgreSQL wasn’t starting on my fresh Ubuntu 9.10 server (so fresh that “aptitude install postgresql-8.4” was the first command I ran).

Continue reading »

Mar01

Bluepill, Upstart, and Delayed Job

rails linux bluepill upstart delayed_job | comments

Recently I’ve had to use delayed_job (which you should be using too!), and rather than have capistrano start delayed job on deploy, I figured I should look into using a process manager, and since I’m a Ruby guy, I decided to see what was available to “gem install”.

Continue reading »

Dec14

Testing JSON/XML responses in Rails

rails test spec | comments

Recently I had to find out how to test the output of a rails controller when the json format is specified. I’m using rspec by the way, but this should work in other frameworks as well.

My instinct, which was wrong, was to do what we do all over the rest of rails:

Continue reading »

Nov12

HTML5 Drag and Drop: Not your father's D&D

html5 ie | comments

I’m working on spicing up the interface to one of our apps, so I thought I’d add some drag and drop to make things easier for users.

Here’s the workflow, the user is typing away at an article, and decides he wants to embed an image. So he selects the image from the file chooser control in the form, and the image is immediately uploaded (thanks YUI io!), and the thumbnail appears in a list on the right.

Continue reading »

Oct30

RSpec and RR troubles

rspec rr | comments

Update: This has to do with Rails and not RSpec or RR

The road to TDD is a dangerous one.

I spent two hours diagnosing an issue that was simple to fix, but a devil to hunt down.

I am using RSpec with RR on a project, and noticed that when I ran my specs with autospec or rake, I had failing tests, but when I ran them individually with spec or textmate, everything was fine.

Continue reading »
Archive