Pivotal Labs

Alex Chaffee's blog



JAVA_HOME on Mac OS X

edit Posted by Alex Chaffee on Thursday June 26, 2008 at 06:57PM

For the millionth time, cause I always forget...

Put this in ~/.bashrc:

export JAVA_HOME=/Library/Java/Home

Also, run "sudo visudo" and add the line

Defaults        env_keep += "JAVA_HOME"

or else commands like "sudo gem install" won't be able to find Java.

Without the above, I got the following error (which seemed to have been run through a baby-talk filter) when running "sudo gem install rjb":

extconf.rb:44: JAVA_HOME is not setted. (RuntimeError)

CPU Leak

edit Posted by Alex Chaffee on Wednesday January 02, 2008 at 12:42PM

I just had to quit Firefox for the umpteenth time because it was taking up 25% of my CPU and 1.5 GB of virtual memory. It makes my lap hot and burns down my battery and activates my fan and slows down my click response time. I have no idea if it was Gmail or Google Reader or one of the other JS-heavy apps and frankly, I'm sick of guessing.

Let's face it: the browser is an operating system. It's time it started acting like one.

Here's what I want my next browser to do:

  • Put every tab's JS in its own thread or process space
  • Pause that process when I switch tabs (i.e. I don't want Gmail to check for incoming mail or chats unless it's in a visible tab)
  • Show me a list of the CPU and memory usage of each JS slice like "top" or the Windows process monitor and allow me to kill them without restarting my browser
  • Same goes for Flash but even moreso: I want every seizure-inducing, focus-stealing, ringtone-blaring flash app to be individually killable and blockable
  • Show me the content of the page now even if some stupid ad or web bug or analytics script on a different server is slow to load

And for Santa's sake when I tell you to quit don't swap in every little JS object and free it individually. Throw the whole heap away and quit, damn your eyes!

OK? OK.

Multi-clipboard for Mac

edit Posted by Alex Chaffee on Wednesday June 13, 2007 at 06:27PM

IntelliJ IDEA has a great feature: if you hit control-shift-V you see a list of the ten most recent selections you cut or copied onto the clipboard. Here are two ways to get the same thing on all Mac OS X apps.


Quicksilver's "Clipboard" and "Shelf" plugins

Bottom line:

  1. In QS preferences, go to (top menu) Plugins / (left menu) AllPlugins
  2. Check the 'Clipboard Module' and the 'Shelf Module' so that they get installed
  3. Bounce QS
  4. Go back into QS preferences and go to (top menu) Preferences / (left menu) Clipboard to tweak your clipboard size and behavior
  5. Now copy some text from some app
  6. Now hit Command-Space, then immediately afterwards once QS comes up Command-L to see the Clipboard History window pop up for you.

I think the Shelf module lets you store clips permanently, but I haven't figured out how to use it yet.


JumpCut

A scissors icon will appear in your menu bar. Whenever you cut or copy a text item, it'll be added to that menu. Clippings can also be accessed by a hotkey (default is Control-Option-V.) A little window like the one you see when using the application switcher or the brightness controls will appear. While holding the modifier keys , use the arrow keys to scroll through the stack.