2009
06/26
02:34

Disabling Rails asset timestamps

One of the common questions in Rails land is how to disable the funny numbers at the end of images and CSS stylesheets. Let’s explore what exactly those numbers are, why they’re sometimes helpful, and how to turn them off when they’re not.

Read more...

06/21
20:21

Wow, Yahoo search advertising sucks

Just for fun, I decided to try Yahoo’s search advertising for a little while. It’s been running for a few weeks now.

Here’s my take on a series of aspects of their service.

First, the initial reason I thought I’d try it: the keyword bid rates are lower. I figured they were lower for a reason, but thought it couldn’t be that bad. Boy was I wrong.

Read more...

05/25
21:17

Zerigo: Pods (VPS), Watchdog (monitoring), and DNS

Just a quick note to introduce a few services I’ve had a hand in developing.

Zerigo Pods are high-performance, easy to use virtual private servers (VPS’s). Zerigo Watchdog is a simple (and free!) server monitoring service. Zerigo NS is a straightforward DNS service (also free!) with a REST API.

Zerigo

Read more...

05/02
04:39

How to work around slow clock drift in a Xen domU

I have a Xen 3.2.1 server and the guests (domU’s), after a few months of uptime, are all behind about 45 seconds. Interestingly, the dom0’s clock is fine.

It seems that the hypervisor’s clock is what’s off as all the guests are off by the same amount. A reboot would likely fix it, but what fun is that?

Read more...

04/23
02:59

Rails 2.3 compatible version of limited_sessions is ready

Rails 2.3 made a lot of changes in how requests are handled. Most (all?) of this has to do with its new support for Rack. Anyway, all of these changes left Rails 2.3 incompatible with the last version of the Limited Sessions plugin.

So, here’s a shiny new version of Limited Sessions to go with your shiny new version of Rails.

Read more...

03/22
19:25

Losing Attention

I’ve noticed an interesting trend lately: I’m having more trouble catching the various prompts and other such on my computer. I think it has to do with bigger screens.

It looks like this: when a friend sends me an IM or someone sends me an email, I don’t always notice. Sometimes it takes hours. I’m losing my ability to pay attention. I hate ignoring people, even unintentionally, so this is somewhat bothersome.

When I’m just in front of my little laptop screen, I don’t have as much trouble. But when I have things spread out across two screens and tons of windows, I miss things more often. It’s even more so when I don’t have the sound turned up.

This makes me wonder though, when things get busy or life just gets spread out, what else do we miss? How many of those things are even more important than a message from a customer or friend? How many of those things are messages from family, friends, customers, and so on? What should we be doing differently to pay more attention in places where it’s important?

2008
08/16
03:57

Rails 500 error - IP spoofing attack

Apparently Rails 2.1 has the nifty ability to throw a 500 Internal Server Error with the message “IP spoofing attack?!” under certain circumstances.

Unfortunately, those circumstances include a common Apache/Mongrel deployment and Yahoo’s crawler, Slurp, trying to index your site. It’s possible Apache/Mongrel isn’t required; I’m unsure.

The key is that Slurp includes both a Client-IP header (HTTP_CLIENT_IP by the time it hits Rails) and an X-Forwarded-For header (HTTP_X_FORWARDED_FOR). When both are present, Rails assumes something evil is happening and voluntarily dies. Neat.

Such a header can be relied on only if it was set by a trusted proxy. Otherwise, it’s hard to know if it was spoofed. The difficulty is for Rails to know which one, if any, was set by a trusted proxy.

I deploy Rails in a common Apache w/mod_proxy_balancer and Mongrel setup. Apache uses X-Forwarded-For natively, so that’s the one I want to trust. To make Rails happy, I’ve just told Apache to delete the Client-IP header if present.

Adding RequestHeader unset Client-IP to the virtual host configuration seems to do the trick.

This does require mod_headers to be enabled in Apache.

07/24
17:14

Rails plugin Limited Sessions updated

I updated my limited_sessions plugin to improve support for Rails 2.1. It should maintain backwards compatibility.

The change surrounds Rails 2.1’s new partial updates support. Basically, it’s turned off for sessions so the session is kept current and doesn’t expire if the user is active.

limited sessions

07/18
19:38

Home Depot: "Just a toy"

I was at Home Depot today trying to match paint colors for some exterior trim. I went to Home Depot because they have a self-service color-matching computer.

As I’m trying to use it, and getting rather poor results, a woman asks one of the clerks, “how well does this work?” He responded, “it’s just a toy.”

Why have something that doesn’t work and is just a toy—something not actually useful for your customers? It’s a breach of trust with those customers.

I did get help from another clerk, but I still left the store feeling a bit disillusioned with Home Depot. They obviously don’t care about me or their other customers—we’re just something to be fooled around with.

In business, it would be worthwhile to always ask, “is this actually useful or helpful to my customers?”

07/06
04:29

for all your needs

The phrase “for all your needs” is pervasive. For all your insurance needs, for all your business needs, for all your printing needs, for all your in-home weekend veterinarian care needs, etc.

Does that phrase seem meaningful to you? It doesn’t to me. Instead, it strikes me as filler—a way to have a phrase to print or speak when nothing else comes to mind or perhaps when no time has been spent to think of something more meaningful.

Spend some time coming up with something interesting to say or at least an interesting way to say it. If your words are only filler, they’ll just go in one ear and out the other—not exactly the desired effect.

Page: 1 2 ... 4