28 December 2012

Painless Java Config and Install for Linux

If you need to install Java on a Debian based Linux distribution, do yourself a favor and use a little shell script named oab-java6.

The oab-java script completely automates the setup of the necessary items for the installation of Java, it's damn simple to use and it completes the set up in just a couple of minutes (depending on the speed of your internet connection). The best part is that nothing gets installed until you actually install it via apt-get.

If you want to know more, then read the doc for oab-java6. It's a very quick read.

19 December 2012

Outlook 2011 for Mac Misbehavior

Recently I upgraded my work computer from Mac OS X Lion to Mountain Lion. I also updated all the MS Office apps. Everything seemed to go off without a hitch as I experienced no issues during the upgrade and all the apps I use on a daily basis haven't seemed to experience any issues... until this week.

As much as I really, really dislike the Microsoft Office products and especially Outlook, I have to use them for my work on a daily basis. Suddenly just this week Outlook began misbehaving by no longer allowing me to search for messages. Any attempt to search my inbox resulted in nothing. This quickly became a pretty big problem because the inability to search made me realize how often I rely upon this feature every day.

Upon doing some research, I found many others with this same issue, but I couldn't find a definitive solution. Digging deeper, I discovered that Outlook relies upon Spotlight to perform searches. So the solution was to reindex the messages in my inbox, right? I tried forcing this by dragging and dropping the MS Office Identities directory into the Spotlight preferences' Privacy tab and then removing it. No dice. Then I tried to simply reindex everything using mdutil:
$ sudo mdutil -i on /
Spotlight server is disabled.
Hmm, I guess I need to enable the Spotlight server:
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Then I was able to run:
$ sudo mdutil -i on /
/:
 Indexing enabled. 
$ sudo mdutil -E /
/:
 Indexing enabled. 
This seemed to trigger some indexing, but nothing notable appeared in the Spotlight menu (cmd-space) like I've seen before when the drive is being reindexed. So the last thing I tried was to determine if there is a plist file for Spotlight. My guess was that the plist file had to become corrupted. In similar cases (I had to do this recently for the screensaver) when a plist file becomes corrupted you have to remove it and let it be recreated. So I found a plist file for Spotlight and removed it:
$ rm ~/Library/Preferences/com.apple.spotlight.plist
After rebooting the computer, I could see the reindexing immediately kick off via the Spotlight menu. After waiting three or four hours for the drive to be indexed, I can again search the inbox in Outlook. Yay!

06 December 2012

Hilarious: Devs vs. Ops

Today I stumbled upon an absolutely hilarious depiction of developer folks vs. operation folks, check it out:

05 December 2012

VIM Syntax Highlighting for Scala: A Bash One-Liner

Just for posterity, here is a Bash one-liner to download the VIM plugins to handle syntax highlighting for Scala:
$ mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do wget --no-check-certificate -O ~/.vim/$d/scala.vim https://raw.github.com/scala/scala-dist/master/tool-support/src/vim/$d/scala.vim; done
Update

Here is a solution using cURL submitted by Joe:
mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do curl -o ~/.vim/$d/scala.vim https://raw.github.com/scala/scala-dist/master/tool-support/src/vim/$d/scala.vim; done