Fighting

I was quite sick most of today. I woke up with a bad headache, which then turned into nausea, and lasted throughout the day. I took two Aleve in the morning, but that didn't help at all. I had planned on using my time off from work to finish working on the vacant Cumberland Rd property, but that didn't happen. I'm very stubborn so no matter how badly I feel like throwing up, no matter how good it will make me feel afterwards, I refuse to do it. I've probably puked once or twice in the past 15 years.

Replace OS X Command+Tab with Witch

Mac OS X has a very limited application switcher built-in, so limited in fact that it's been driving me crazy. You cannot use Command+Tab to switch between multiple windows of the same application; you must use another keyboard shortcut: Command+`. Another huge limitation is the inability to switch between minimized applications. Once an application is minimized, I have no way of restoring it with the keyboard; that's actually not true: you can hold the Option key after highlighting the minimized application to restore it.

A very nice replacement application switcher is a program called Witch, developed by Peter Maurer. The only problem is that OS X prevents you from replacing the keyboard sequence Command+Tab. I could learn another keyboard shortcut, but why? I've been using Alt+Tab (the Windows version of the same shortcut) for years and I don't want to be relearning things unless absolutely necessary.

The solution is to use two other programs, PullTab and Unsanity Application Enhancer, to disable Command+Tab. Then you can bind Command+Tab to launch Witch. Although this sounds complicated, its really not. There is a nice video tutorial that explains how to do all this, however I'd rather read directions than watch them.

Step 1: Download and install Unsanity Application Enhancer. It's very straightforward. After downloading, mount the image, and double click on the installation program.

Step 2: Download and install PullTab. This is a little less straightforward. After downloading and mounting the image, you need to copy the PullTab.ape file to one of two places:

To install for all users on your Mac, copy the file here:
LibraryApplication Enhancers

To install for only yourself, copy the file here (if the directory doesn't exist, create it):
UsersLibraryApplication Enhancers

Step 3: Logout and then back in. Command+Tab should now be disabled.

Step 4: Download and install Witch. After mounting the image, simply double click on the Witch.prefPane file. This will install a new panel in your System Preferences. Now that Command+Tab is disabled, you can bind it from within the Witch preferences panel to activate Witch!

Stolen Chairs

This weekend I discovered that someone walked into my fenced off back yard and stole my two blue beach chairs. It's pretty ridiculous when you cannot even leave a chair outside without having it stolen.

I'm partially angry at whoever stole them, but I'm also angry at myself for leaving them outside. This is all the more reason to own less.

Blueberries

These are huge blueberries. An excellent source of antioxidants. Usually they're expensive, > $4.50, but I found them on sale in Whole Foods for only $2.50! It must be the season.

Personal Blurb

I had to write a quick personal blurb for work today. I figured I would post it here as well.

Raam Dev is a self-taught hardware and software engineer with an in-depth understanding of how technology works. He is proficient in explaining and conveying technical terminology to end users and troubleshooting network, software, and hardware issues. His skill set includes variety of skills, including PHP web programming, MySQL database management, Linux and Windows server administration, and network security.

Sold my Thinkpad T41

So it looks like I'll be getting a MacBook Pro, partially paid for by my workplace. We worked out a deal where I was able to sell my IBM Thinkpad T41 to Aerva for another co-worker to use. I'm wondering how much I'm going to miss the Thinkpad though, as I seem to have developed a liking for them over the years. I still have an old Thinkpad 600E running Linux, so maybe that will be enough to quench my Thinkpad thirst.

I'm glad I'll be getting the newer Santa Rosa MacBook with an LED display, which were released only a few weeks ago. However I do wish I could be getting the next version of Mac OS X (Leopard) which is coming out mid-late summer. I probably won't spend the $130 to upgrade once it comes out.

Pictures and more info once I have them.

Need Money. Must Sell Car.

So I've dropped the price on my Audi by $700, to $4800. I didn't want to, but I really need to sell it. It appears I'm not going to have enough money to pay all three of my mortgages again this month, so unless I sell the car by the end of the week the late mortgage will be reported to my credit bureau as late. In fact, this month I've come to accept that its probably unavoidable this time.

On the up side, I received a $560 check from one of my other mortgage companies in the mail today. Apparently they over estimated the taxes and/or insurance for the escrow account, so they sent me a refund. Great. Now I'm only $1500 short.

Lots of driving!

David and I will have done over 1,300 miles of driving by the time we get back to Boston tomorrow afternoon. One thing I can say for sure about Pennsylvania drivers is that they drive like idiots! They beep their horn twice for no apparent reason and instead of accelerating on the on ramps to the highway, they STOP! Their idiotic driving creates traffic on the highway on a Sunday afternoon! The streets are messed up too. They have entirely different streets with the same exact name within a few blocks of each other, making it very easy to get lost.

But, negative criticism aside, there are a few good points I'd like to mention. It's amazing how much farmland and forest there is West of Philadelphia. There were so many areas where the forest was so thick and overgrown that you would think you were on a tropical island. Kennywood theme park was pretty good, but not awesome. It was comparable to Six Flags in Massachusetts.

Recovering from power outages with a Linux Mac Mini

My Debian GNU/Linux server Pluto, which is located in my apartment in Cambridge, is running on a Mac Mini (PowerPC). Over the past few days, I've had several power outages. When the power comes back on, my Windows computer turns back on and, if I need to, I can remotely connect to it from the office. Pluto however, does not automatically turn back on. I need to physically turn it on when I get home from work. This is not acceptable!

On a PC, there is a BIOS option called PWRON After PWR-Fail. This simply turns the computer back on if the power goes out while it is running. Great, but the Mac Mini doesn't have a standard BIOS; it has OpenFirmware! I did lots of Googling and came up with solutions specific to Mac OS X, but that doesn't help me since I'm running Linux. I even discovered the command line utility pmset which can be used to modify power management settings from within OS X (and a nifty option called autorestart which causes the Mac to automatically restart after power failure). I thought maybe I could find the pmset utility for Linux and install that, but that turned up nothing as well.

Eventually, I found the answer in this forum post on an Ubuntu forum. It's amazing how the Ubuntu operating system has created such a huge wealth of information for the Linux community. This huge pool of questions and answers has made finding solutions to common (or not so common) Linux issues much easier over the past few years.

As root, execute the following command:

echo 'server_mode=1' > /proc/pmu/options

You can confirm the changes have been made by running:

cat /proc/pmu/options

If server_mode=1, then you're all set. You can try unplugging the power from your Mac Mini, waiting a few minutes, and plugging it back in. The Mini should turn on as soon as you plug in the power.

Pennsylvania Road Trip

I'll be leaving for Pennsylvania tonight at 3AM with two of my co-workers. We'll be driving to Pittsburgh, PA (10 hrs). Then early Sunday morning we'll drive to Philadelphia, PA and on Monday morning we'll head back to Boston, MA. This is a combined business/recreational road trip and I'll be bringing my camera. There will be Internet access at the hotels, so I might post some pictures.

Exploding Manhole

As I was walking home today, I noticed a crew working near a manhole in the street. I saw light brown smoke coming up from the manhole, but thought nothing of it and continued walking.

Suddenly, I heard a huge explosion. It sounded like a bad car accident. I looked towards where the crew was working and I saw everyone backing away from the manhole. I stood around for a few more minutes, trying to figure out what happened. Someone riding a bike, who was closer to the explosion, rode by and I asked what happen. He explained that the manhole exploded and said that was what has been causing the power outages.

That explains the power outage late last night, and again this morning. Even as I was writing this post, the power went out again. A few minutes later it came back on and I decided to research what exactly causes an exploding manhole. I found this really nice explanation on howstuffworks.com. Learning something new every day!

39 Ways to Live, and Not Merely Exist

I came across a really cool article on Digg today called 39 Ways to Live, and Not Merely Exist. After reading the entire list, I couldn't help but realize how much of my life is spent in front of a computer screen. I've started to become aware of the radiation I'm soaking in and can actually feel the negative effects it's having on my body. It certainly doesn't help that my work requires me to sit in front of the screen 8+ hours a day.

I've already accomplished #9 on the list, turn off the TV. I do not have a TV even hooked up in my apartment, so I never watch it. I find that by simply making something unavailable, we automatically avoid it. I don't have salt or sugar in my kitchen. I don't see any use for them. If I had them there, I'd look for any reason to use them while cooking. By keeping a bottle of water on my desk at work, I constantly drink more water throughout the day. If I had to get up and walk somewhere to get the bottle, I'd drink a lot less water.

I really like creating routines (but strangely, I hate living a routine life). I find a routine to be the best and most simple way to form new habits (or get rid of bad ones). Create a morning ritual (#4), watch sunsets daily (#30), and try something new every week (#38) are all things I'd like to start doing. Taking mini-retirements (#27) is something I've always wanted to do and I'm working towards that goal. I hope to be there within the next few years.

Do not disable browser.cache.memory.enable!

A few weeks ago I wrote about my Firefox tweaks. One of those tweaks is to disable browser.cache.memory.enable. Here is an explanation of this option from this Computer World article:

Reduce graphics caching
When the Boolean preference browser.cache.memory.enable is enabled (the default), Firefox keeps copies of all graphical elements from the current browsing session in memory for faster rendering. You can set this to false to free up more memory, but pages in your history will reload less quickly when you revisit them.

So why is this option bad? Well, I've been working on an application for work, an FAQ Manager, and for the past few weeks I've been puzzled as to why a row of images would randomly not load.

Some would load and some wouldn't, even though they're all pointing to the same place (if one image works, they should all work!). When I tried loading the page in Internet Explorer, it worked fine. I tested it on my Firefox browser at home and at work and the same issue occurred, so I thought it couldn't be a browser issue. Then I asked my co-worker, Raf, and he told me to try it in Firefox on his computer. To my surprise, it worked!

After trying to disable a couple of different tweaks, I finally discovered it was browser.cache.memory.enable that was causing the issue. So a little advice: don't tweak that setting!

Recycling the recycled

Earlier today, I needed to ship a couple of items I sold on eBay. I didn't have any boxes small enough for the items and I did not have any type of packing material. So I bought some small boxes at the local FedEx store for $2 each. The small bags of peanuts were $5 a bag. I decided the peanuts were too expensive and bought a newspaper for 50 cents to use as the packing material instead.

Tomorrow is trash day and as I was walking home from work I noticed recycle bin's full of old newspapers. I grabbed as many as I could carry without attracting attention. Then I noticed something else in the recycle bins -- boxes! I grabbed a couple of them and quickly realized that this can become my weekly "packing material pickup day". All the shipping materials I need for running my little eBay business are freely available -- sorted and placed on the sidewalk for me every week! I'll recycle the recycled!

Headaches

If there is one pain that clearly signals something is wrong, it's a headache. I get them a lot. In fact, I've sort of learned to cope with having a headache during 70% of my waking hours. Maybe that's why I constantly look like I'm concentrating (which probably helps me come across as mean or unapproachable). Usually they're mild. But sometimes, such as right now, they're so bad I cannot sleep.

Headaches. I need to fix them.

And please don't suggest pills. Covering the symptom never fixes the problem -- it only delays it.

mutt folderfilter errors

I've been slowly setting up mutt, along with offlineimap and fetchmail, to replace Thunderbird as my primary email client. One of the problems I ran into was with the offlineimap folderfilter option. I only wanted to sync a few specific folders on my IMAP server, instead of all of them. The way you do this with offlineimap is to use the folderfilter option. According to the offlineimap documentation, here is how you do it:


folderfilter = lambda foldername: foldername in [
      'Mail/INBOX',
      'Mail/list/zaurus-general',
      'Mail/list/zaurus-dev',
      ]

However, after copying and pasting that very same command (changing the folder names of course), I received the following errors:


Traceback (most recent call last):
File "/usr/bin/offlineimap", line 21, in ?
init.startup('4.0.8')
File "/usr/lib/python2.3/site-packages/offlineimap/init.py", line 79, in startup
config.read(configfilename)
File "/usr/lib/python2.3/ConfigParser.py", line 263, in read
self._read(fp, filename)
File "/usr/lib/python2.3/ConfigParser.py", line 484, in _read
raise e
ConfigParser.ParsingError: File contains parsing errors: /home/raam/.offlineimaprc
[line 34]: ']n'

At first glance, those look like some pretty obscure errors. So what's the problem? The new line character (n)! During my copy and paste, hidden characters were copied over. After I put the entire folderfilter opton on a single line, I was able to move each mailbox entry down to it's own line and run offlineimap without errors.

Not a very exciting problem (or solution), however this might find it's way into someone's Google search and resolve a not-so-obvious problem.

Recovering from CTRL+S in Putty

Every once in awhile, I'll press CTRL+S by accident while I'm inside a terminal window. For the longest time, this simple accidental keystroke meant I had reconnect to my Linux server, kill whatever program I was running, and then start it again. Eventually I got sick of this happening and decided to do what I should have done in the first place: Google It.

Apparently CTRL+S actually does XOFF, which means the terminal will accept key strokes but won't show the output of anything. It will appear as if your terminal is dead when it's really just waiting to be turned back on. The fix? Simply press CTRL+Q to turn flow-control on (XON). If you pressed a whole bunch of keys before pressing CTRL+Q, you'll see the output from those keystrokes.

In the Windows world, CTRL+S is used as the Save command. Over the years, I've developed the habit of pressing CTRL+S every few minutes while working on a document, simply because I've had too much work lost from stupid errors. Thankfully, this habit will no longer get in my way of working in the Linux world.

Update: A commenter suggested a way to disable CTRL+S from sending XOFF altogether:

add this to your .bashrc (man stty for more options):
stty ixany
stty ixoff -ixon

Update: A commenter provided a tip for making CTRL+S actually save the file in Putty'd VIM.