Background on Mac OS X Lion Gets Stuck on Gray Linen Background and Menu Bar is Black

I’ve been having this problem intermittently when plugging in and unplugging my external monitor.

I found a fix to the black menu bar that involved going into System Preferences->Desktop & Screen Saver and toggling the “Translucent Menu Bar” setting.

However, my backgrounds were still the gray linen background. Upon further searching for that system, I found that killing the fixing the problem via one of the following code (which I put in my ~/bin as “fixLinenBackground”)

sudo kill -HUP `ps -ef | grep [D] | awk '{print $2}'`



Script to Change the Title of Your Terminal Window

I decided to create a small bash script to change the title of my current terminal window in bash on my Mac:


echo -ne "33]0;" $* "07"

The script then runs as:

change_title Your title goes here.

What Gets Added When I Require a File in Ruby?

Let’s say you want to know what symbols are added when you require something in ruby. For example, I was curious if I could get a list of symbols that were added when I required ‘english’.

I simply used Symbol.all_symbols to save off the old symbol array and the new one and then subtracted the two arrays.

before = Symbol.all_symbols
require 'english'
after = Symbol.all_symbols
added_symbols = after - before 
p added_symbols # should be an Array of symbols added.
puts added_symbols.count # I get 35.

Do you have other favorites?

One Month Out, “Normal” Still Seems Foreign

It’s been a month since I survived a car crash that demolished my car.

Since then, we’ve closed on our new home, bought a new car, and spent two days’ worth of effort moving in.┬áBecause of the second car payment, our finances are not as secure as I’d like them to be, but we’re capable of making it–even if the next 6 months will be stressful.

I’ve gotten back to running to some degree. The last two blips in the graph below represent my “return” the last two weeks, after 4 weeks off. Hardly compares to my normal weeks, or even my “even” weeks before.

Weekly running totals

After running 5.5 miles this week and moving things, I realized my ribs aren’t quite healed enough for physical activity. I had been able to quit taking ibuprofen, but I’m having to take it again due to the pain. Picking up anything over 20 pounds aggravates the pain.

I’m wallowing in a fair amount of self-pity, but, right now, I’m just hoping for a normal, relatively pain-free life–outside of running. Seeing my aunt in her final days of her battle with cancer when she has a brand new granddaughter and knowing that I survived the wreck puts things in perspective, but it doesn’t make the waiting and uncertainty of healing any better.