My Weblog

Fri, 28 Jan 2011

Reducing Chrome Power Usage in Linux

I'm running ubuntu maverick on my ASUS U35F. It's got a couple problems (LCD screen viewing angle is right out of the 1990s, no nvidia graphics because they only offer the jury-rigged and linux-incompatible "Optimus", no CDROM drive -- I used to care about this; somebody remind me why) but it's fast & quiet, has plenty of RAM and hard drive space, and it has phenomenal battery life. Like you can use it during the whole flight ... to Korea.

That is, it will last the whole flight if you're careful. What's the best way to manage power usage in linux? Powertop. What causes the most problems for a web browser tab-addict like myself? Unsurprisingly, Adobe's flash player ("npviewer.bin") and the resource-hungry applets people create therein. So how do I track down the obscure pages where flash is doing nothing but wasting battery? (the AWS login page, anyone?!?) Press shift-escape to open chrome's awesome task manager, then scroll down to "Shockwave Flash" and click "End Process". Any tabs running flash get a little message bar at the top and battery usage falls to a tree-hugging 8-watts-or-so.

posted at: 00:00 | path: | permanent link to this entry

Sun, 30 May 2010

Speeding up Google Chrome in Linux

Google-chrome was getting slower and slower on my otherwise-performant-seeming EeePC laptop. Sometimes it would take 10 seconds to open a page. And, after opening a page, while further assets were loading, the browser would become unresponsive and Chrome would offer to kill them.

Why? Well, I'm running ubuntu karmic, with a luks-encrypted ext3 home directory on the EeePC's cheap SSD. Somewhere in that stack, I believe Chrome's disk cache writes were beginning to bog down, as evidenced by kcryptd's appearance in "top".

To prove that disk performance was the culprit, I copied ~/.cache to my ramdisk /tmp/ directory and symlinked it back to my home directory. This instantly made chrome feel faster than a flying potato.

So how do I get that level of performance while still storing my cache on a persistent storage medium? After mucking around in /proc/sys/vm/ for a while to no avail, I tried ext3's "data=writeback" option. Works like a charm. The occasional fsck seems like a small price to pay. And, of course, it speeds up every app on the machine -- not just Chrome. This is life-changing if you have a cheap SSD.

posted at: 00:00 | path: | permanent link to this entry

Fri, 28 May 2010

Epictetus Quotes

Wealth consists not in having great possessions, but in having few wants.

You are a little soul carrying around a corpse.

(just a couple of Epictus' many great quotes)

posted at: 12:13 | path: | permanent link to this entry

Mon, 03 May 2010


Helped build CrowdPhoto this weekend at Startup Weekend LA.

What was fun for me: Doing another project with the talented "ShareMySpot" gang from last year's SWLA, attracting a couple developers willing to learn the Android platform (in 48 hours!) and able to launch the mobile app that makes CrowdPhoto push-button simple, learning about the power of realtime PR (Twitter), learning about Amazon SimpleDB, working with the new ubuntu "lucid" release, barbecue on the roof of an Ocean Ave apartment building, a third customer for, and meeting a bunch of smart people from the LA startup world.

CoLoft graciously hosted the event and sponsored a 1-month free membership for the 2nd-place team, so I look forward to taking advantage of that over the next 4 weeks!

posted at: 00:43 | path: | permanent link to this entry

Mon, 08 Mar 2010


ZipRecruiter (previously named StarterView), is a new site we launched that helps hiring managers find candidates. ZipRecruiter is already delivering value for its closed beta customers, so we figured it's time to open it up to the world. Come on by, create a free account, and start receiving qualified applicants in your inbox. We'd love to hear your feedback.

posted at: 00:00 | path: | permanent link to this entry

Fri, 29 Jan 2010

Earlier this month, I wrote a simple image resizing service. We're using it at and I hope it will be useful for other sites that want to save the time & effort of implementing their own image scaling & caching.

posted at: 23:37 | path: | permanent link to this entry

Buddhist Proverb

If you are facing in the right direction, all you need to do is keep walking.

posted at: 16:50 | path: | permanent link to this entry

Sun, 30 Aug 2009

Firefox Search Tool for Google

Lost your Firefox Search Tool (aka "search plugin") for Google? I did. Here's how to get it back without reinstalling firefox.

Right click this Firefox Google Search Tool link, select "Save Link As..." and save it in the "searchplugins" subdirectory of your profile folder. You may need to right-click in the "save as" dialog and tick the "show hidden files" checkbox. Restart firefox and you'll have your google search plugin back.

posted at: 16:04 | path: | permanent link to this entry

Sun, 02 Aug 2009

What I Do When Android Is Slow

When my HTC G1 (running android) gets slow, I have a simple, free way to speed it up (for a while). Eject the microSD card. Remember to unmount it first (Home -> Menu -> Settings -> SD card & phone storage -> Unmount SD card).

Plug the card back in, and life is good.

Unfortunately, the first google result for "android slow", has been marked read-only ("archived") by T-Mobile and its upshot is "buy a new SD card". Here's hoping this blog post climbs high enough in google to save a few people some money.

posted at: 05:00 | path: | permanent link to this entry

Sun, 26 Jul 2009

mp3splt rulez

I converted each of my CDs to a single FLAC file for online access and backup. See earlier post about abcde.

Here's my recipe for using ubuntu hardy to convert them into small audio files with id3-style info available, for use on my android phone or Michelle's Sansa Fuze:

That's it. Mp3splt extracts artist, album, track information from the cue file and puts it in ogg comments, which are read by both the Sansa Fuze and the android music player.

posted at: 07:47 | path: | permanent link to this entry

Fri, 10 Jul 2009

Bogof Marketing

Economizing yesterday, I went to Subway for lunch. With my order, they gave me four of those scrach-and-win type cards. The first three yielded nothing, but the last one showed I was the winner of a BOGOF Reggae Chicken Sandwich. Exciting! I've never had bogof reggae chicken before.

Normally, I wouldn't eat Subway two days in a row, but I recently read about a study that shows people tend to put off appealing tasks just as much as they put off unappealing tasks. And, while I'm savvier and more diligent (not to mention more handsome) than the average punter in a psychology study, in this respect I'm afraid my propensity for ruts leaves me on the other end of the bell curve. So today, I went to another Subway to cash it in ASAP.

I can almost taste the delightful bogof reggae chicken as I stand in line and the manager congratulates me as their first winner! Even better, my golden ticket curiously didn't specify whether I was to be the recipient of a free 6" sub or a free 12" sub. But guess what... she's preparing the full 12-incher for me. Truly, today is my lucky day.

At the end of the line (No thanks, no sauces on that; I wouldn't want any superfluous flavors that might compete with the delicate mixture of bogof reggae herbs and spices) she taps at the register a bit and demands £2.99. Excuse me? That's more than a whole sandwich at the Subways back home. And what about my golden ticket?!?

"No," she says, "that's the price of a 6 inch. You see, this here means 'Buy One Get One Free.' So I gave you one 6-inch sandwich for free and you have to pay for the other one." I'm not sure what the penalty is here for pelting the cashier with those obnoxious little pound coins, so I thanked her, took my sandwich, and left.

So today's recommendation to heal the economy is: Let's not give our tax dollars to the !@#$% marketing department.

posted at: 11:35 | path: | permanent link to this entry

Thu, 09 Jul 2009

One Small Step for Crisiskind

Here's my contribution to fixing the financial crisis: Any bank that gets more than a billion of my tax dollars must abolish ATM fees. That would encourage people to spend more money, right?

posted at: 13:23 | path: | permanent link to this entry

Mon, 27 Apr 2009

The Solitary Basics at Parque Nacional Puyehue

We are sipping a cup of wine-from-a-box at a roofed picnic table in campsite 23 at Camping Chanleufú in Aguas Calientes, Chile. The night is damp and chilly but we have warm clothes. There's a light under the roof, so Michelle is reading her book, and I have the laptop plugged in so I can blog and do a little computer programming. We plan to break out the MSR stove in an hour or so to cook instant risotto.

There's nobody else in the campsite. So far, we haven't even seen a ranger to collect the alleged $20 fee. Maybe has something to do with the car barrier at the entrance, but of course we just walked in from thee bus.

It's kinda bizarre, but we have everything we need. Another day well below our target budget...

posted at: 00:00 | path: | permanent link to this entry

Wed, 04 Mar 2009

The procedure I followed to get ghc 6.10, cabal-install, and happs-tutorial 0.6.5 working in ubuntu 8.10 (intrepid) or ubuntu 8.04 (hardy)


cat <<EOF >~/bin/cabal-install-this
runhaskell \$setup configure --prefix=$HOME --user &&
runhaskell \$setup build &&
runhaskell \$setup install --user
chmod a+x ~/bin/cabal-install-this

sudo apt-get install libgmp3c2 gcc libc6-dev g++ zlib1g-dev libgmp3-dev darcs

tar jxvf ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2
pushd ghc-6.10.1
sudo make install  # installs in /usr/local/ by default

tar zxvf HTTP-$httpv.tar.gz
pushd HTTP-$httpv/
cabal-install-this Setup.lhs 

tar zxvf zlib- 
pushd zlib-
cabal-install-this Setup.hs 

tar zxvf Crypto-$cryptov.tar.gz 
pushd Crypto-$cryptov/
cabal-install-this Setup.hs

darcs get
pushd cabal-install
cabal-install-this Setup.hs

cabal update
cabal install happs-tutorial
happs-tutorial 5001 True True

posted at: 23:38 | path: | permanent link to this entry

A rough outline of the procedure I followed to get orchid-demo 0.0.4 working in ubuntu 8.10

First, see previous instructions to install cabal. Then:
sudo apt-get install libssl-dev

cabal install orchid-demo

orchid-demo --extract

w3m -dump http://localhost:8080/

posted at: 22:10 | path: | permanent link to this entry

Thu, 04 Dec 2008

Tab Mix Plus Session Management

Tab Mix Plus' Session Management works better for me than either Session Manager or Firefox 3's built-in session management features. In particular, the crash recovery features of the latter two don't work well for me. Tab Mix Plus' crash recovery works great. Important now that I'm using Adobe's alpha and crash-prone 64-bit Flash plugin.

posted at: 17:35 | path: | permanent link to this entry

Mon, 26 May 2008

ripping to flac + cue for slimserver using abcde in ubuntu hardy

Ubuntu Hardy Heron erased my mp3 collection. OK, I was a little reckless in assuming that, if I installed it over my existing ext3 partition, it wouldn't overwrite /usr/local/mp3/.

Photorec actually was able to recover over 15,000 mp3 files. Unfortunately, I don't own 15k mp3s. It had recovered 15k mp3 fragments. Fun to listen to on shuffle play (sounds like somebody fiddling with a radio dial in a city full of people exactly like me) but not really "recovered" in any useful way.

My take-away from this experience? Store files like this (not sensitive, but expensive to reproduce) on a partition that has good undelete support. Ext2 supports undelete; ext3 does not support undelete.

On the bright side, this is a perfect excuse to re-encode my entire collection in a lossless format. I'm still trying to decide whether to pay $1-2 per CD to have an outside service rip and encode my CDs or just feed CDs into the machine myself. In the meantime, I'm at least trying to identify the perfect format. I think I've found it: FLAC + cue seems like the best "copy of the CD" approach. Slimserver plays them gaplessly and you can burn a FLAC + cue file to a CD directly, if necessary.

In the past, I've liked abcde for ripping CDs, so I used the following command to rip the CD and the cue file in ubuntu hardy:

abcde -1 -M -p -o flac

This worked fine, except that slimserver wouldn't read the FLAC file. It just showed 10 tracks, each with the title of the album. After a little fiddling, I found that changing the "FILE" line allowed slimserver to read the file. So here's a messy litte script to fix up the cue files after ripping:

find . -name '*.cue' -print | xargs perl -pi.orig -e 'my $flacname = $1 if $ARGV =~ m#/([^/]+\.flac)\.cue$#; s/^FILE "dummy\.wav" WAVE$/FILE "$flacname" FLAC/;'

posted at: 16:52 | path: | permanent link to this entry

Tue, 08 May 2007

Firefox Search Plugin Selection

Using a firefox search plugin has some advantages over a custom keyword:

One thing that took me a long time to figure out: You can scroll through your search engines using Ctrl-Up and Ctrl-Down (while the cursor is in the search field). This is a little worse than typing "Ctrl-L g g " because it requires you to look at the search box (the latter can be done with your eyes closed). But given all the other advantages of OpenSearch, it's how I search nowadays.

posted at: 00:49 | path: | permanent link to this entry

Thu, 05 Apr 2007

Biking Happiness

A couple months ago, my office moved near my apartment. Not only are we now located in a vibrant, scenic, progressive, beachside community, but we are also close enough to my home that I can bike to work. And, four days out of five, that's what I do.

I knew driving in Los Angeles made me frustrated. It just seems like such a tragic waste of everyone's time. But I had no idea how happy I would be commuting by bike. Well, the jury is in.

What do I like about biking? The smells. The unobstructed panoramic views (OK, maybe a convertible would work for that). Sneaking right past lines of stopped traffic. Free parking. No time spent in the parking garage, waiting in a line of cars behind the Escalade that just has to have the parking spot currently occupied by the world's slowest person. Free exercise. Food is cheaper than gas. I can bike home after three beers.

posted at: 10:34 | path: | permanent link to this entry

Sun, 01 Apr 2007

Keyconfig for Mouseless Mozilla

Today I learned a little about the wonderful world of Keyconfig. Install that keyconfig.xpi in both firefox and thunderbird, then get started assigning keys to javascript functions.

If keyconfig doesn't include a javascript function to do what you want, you may have to search the web for it. In thunderbird, to move an email to a folder with a single keystroke, I followed Deef's helpful instructions. In firefox, to open the "back button history menu", I quit firefox, added a couple of snippets of javascript from Mozillazine's Keyconfig Page to ~/.mozilla/firefox/*.default/prefs.js, restarted firefox, opened keyconfig (with Ctrl-Shift-F12) and assigned Alt-Shift-Left Arrow to "Back Menu".

posted at: 00:00 | path: | permanent link to this entry

Sun, 25 Mar 2007

Dovecot Rules

I've spent a few hours over the past few weeks getting my ubuntu postfix installation configured to support SMTP AUTH. After screwing around with Cyrus SASL for far too long, I found this suggestion in the postfix SASL README: Use Dovecot's SASL support instead.

Since I had already switched from courier to dovecot as my IMAP server, modifying its configuration to serve SASL for postfix was a breeze. Dovecot rules!

posted at: 20:50 | path: | permanent link to this entry

Thu, 14 Dec 2006

Matter-Energy Classification

Matter : Energy :: Noun : Verb :: Data : Function

Why do we divide things up this way?

posted at: 10:47 | path: | permanent link to this entry

Tue, 05 Dec 2006

Childhood Smells

Today I smelled something that reminded me of preschool. Someday I'd like to go find all the smells that remind me of various phases of my childhood: all the schools I attended, everyone's home I visited, all the foods I ate. Then, if there were some way to make my own scratch-and-sniff book...

posted at: 22:46 | path: | permanent link to this entry

Wed, 15 Nov 2006

Family That Walks on All Fours

I saw a touching and educational Nova episode tonight about a family in Turkey, many of whose members are afflicted with a genetic disease that interferes with their ability to walk upright.

It's fascinating how our genome leads to our actual morphology. It's as if our genes were designed for evolution. I wonder if other organisms (viruses?) or ecosystems fail because the way their genotype encodes their phenotype doesn't lend itself to stable mutations like ours does. Perhaps this trait could be defined and measured as a reduction in the percentage of possible mutations that yield catastrophic (unsurvivable) failures.

There are lots of ways to encode (compress) information. Some just seem to be more useful (meaningful?) than others.

posted at: 01:07 | path: | permanent link to this entry

Mon, 06 Nov 2006

Geeky Gift Ideas

Here are some techie gift ideas for your favorite nerd. If your favorite nerd is me, you have no excuse for getting me a tie for Christmas.

See more of my Geeky Gift Ideas list at ThisNext.

posted at: 14:17 | path: | permanent link to this entry

Sat, 28 Oct 2006

Blinking VCR Light Rant

Everybody loves to make fun of the luddite who slaps a piece of masking over the incorrect, blinking time displayed by their VCR. Granted, in this age of DVDs and PVRs, only a luddite would still own a VCR. But these infernal, blinking, green, epilepsy-inducing, referenceless non-clocks are installed in everything these days, including radios, microwave ovens, and cars.

The masking tape user does not deserve our scorn. It's the VCR designer who is to blame. He assumes the user wants their VCR to know the correct time. Now, some people use their VCR as a clock. Some people ask their VCR to record a specific channel at a specific time, and this requires that the clock be accurate. But nobody else, luddite or technophile, needs their VCR (or radio or microwave oven or car) to know what time it is.

Setting the time on your VCR isn't trivial. Even if the buttons are clearly labeled, first you have to find an accurate clock and then you have to press your clearly-labeled buttons in one of the seemingly-infinite combinations and permutations on which all the different manufacturers have failed to standardize. Power outages are inconvenient as it is. Why must our presumptuous appliances hassle us further? The VCR should be able to figure out whether I need it to know the correct time. Only show me the blinking clock if I have a program scheduled to record.

While I'm defending the luddites, I gotta make a case for the VCR too. Its superiority lies in its comprehensible user interface. The DVD menu is, possibly excluding Brad Pitt, the most-annoying invention of the movie industry. What made them think I wanted to solve a goddamned choose-your-own-adventure game just to watch my Star Wars 2 DVD? Which button is highlighted? Do I go "right" or "down" to get to the next button? Did my remote control's infrared command not make it to the DVD player, or did it receive the command and is it just waiting for steam to come out of my ears before actually performing it? I long for the "play", "rewind", "fast forward" simplicity of the VCR. The DVD gives me nothing in exchange for the simplicity it stole.

posted at: 00:00 | path: | permanent link to this entry

Thu, 21 Sep 2006

Solar Computers

A few weeks ago, my friends and I walked past an illuminated, temporary road sign. It had a solar collector at the top to charge its battery. We speculated that it would be more efficient to redirect the light from the sun out through the pixels in the sign. Likewise, if fully-optical computers become practical, perhaps I can power one by just setting it out in the sun. Yeah, yeah: peripherals, nighttime...

posted at: 11:00 | path: | permanent link to this entry

Fri, 01 Sep 2006

Sudo Alias

Here's a fun way to make linux system administration more like first grade:

alias simonsays=sudo

posted at: 17:49 | path: | permanent link to this entry

Wed, 30 Aug 2006

Personal DNA

I took the "Personal DNA" test today. There are 20 minutes of my life I'll never get back. The results were pretty accurate. But that could just be because they're parroting back all my answers to their questions.

posted at: 14:38 | path: | permanent link to this entry

Wed, 09 Aug 2006

Scratch-and-Vote System Could Help Eliminate Election Fraud

I'm optimistic about the Pret-a-voter voting system. Could be the voting system of the future.

Pros compared to traditional paper voting:

Pros compared to existing electronic voting systems:

posted at: 00:50 | path: | permanent link to this entry

Mon, 07 Aug 2006


I really appreciate the word "plurality". It's the word that, at a glance, tells you you're reading a patent and not, say, a useful document that actually explains how to do something.

posted at: 14:00 | path: | permanent link to this entry

Fri, 21 Jul 2006

Gnome "Run Application" Dialog

To bring up the "run application" popup in gnome (on ubuntu dapper, anyway), use "Alt-F2". If you just want to run some X program (like xmag), this is quicker than opening a whole terminal.

posted at: 10:32 | path: | permanent link to this entry

Mon, 10 Jul 2006

GMailUI and Courier IMAP

I am very pleased with Ken Mixter's GmailUI Thunderbird extension. My #1 favorite feature is that it lets me use the "Y" key to yank the message into my archive folder. But it took my a while to figure out how my IMAP server (Courier) organizes its namespace. All the folders are under "Inbox.". So, in order for the "Y" key to work correctly, I need to configure GMailUI to point to "Inbox.Archive".

If I get a free hour, I'd like to extend GmailUI to move the message into "Inbox.ConfirmedSpam" (for input to spamassassin's Bayesian classifier) when the "Y" key is pressed on a message that's marked in thunderbird as "Junk".

posted at: 14:59 | path: | permanent link to this entry

Mon, 05 Jun 2006

Tab Mix Plus

I just started using Tab Mix Plus. It's great. I'm a fan of these features:

I disabled these features that came enabled by default: I'm not so sure about these default features, but I'm going to give 'em a try for a while:

posted at: 15:26 | path: | permanent link to this entry

Sun, 04 Jun 2006

Send Bug Reports to PalmSource

Here's a page that explains how to send a bug report to PalmSource. I assume these are the people who can fix bugs in the OS and apps that came pre-installed on my treo 650. They say:

Please include as much detail as possible about the problem you are experiencing.

The minimum set of information required is:

  • The product that has the problem
  • A summary of the problem
  • Steps to reproduce
  • Expected results
  • Actual results

[send the email to]

posted at: 15:20 | path: | permanent link to this entry

Tue, 30 May 2006

Batman Begins

I guess my expectations for superhero movies (or action movies employing Liam Neeson) have finally sunk low enough. I really enjoyed Batman Begins.

posted at: 00:18 | path: | permanent link to this entry

Mon, 29 May 2006

How to Clean an LCD Screen

Jeremy Zawodny hosts a long discussion about how to clean your LCD screen. My take-away: 50% isopropyl alcohol + 50% water worked well.

posted at: 14:15 | path: | permanent link to this entry

Thu, 25 May 2006

Building HAppS in Ubuntu Dapper

Took me a while to figure out how to build HApps under ubuntu dapper. Here's what I did:

# build fps (seems to be no ubuntu package for this)

darcs get
cd fps
# HAppS calls breakFirst:
darcs obliterate --from-patch "we kill breakFirst/breakLast"
runhaskell Setup.hs configure --ghc --prefix=/usr/local
runhaskell Setup.hs build
sudo runhaskell Setup.hs install

# build HApps

darcs get --partial
cd HAppS
darcs obliterate --from-patch "we kill breakFirst/breakLast"
runhaskell Setup.hs configure --ghc --prefix=/usr/local
runhaskell Setup.hs build
sudo runhaskell Setup.hs install

posted at: 23:52 | path: | permanent link to this entry

Thu, 18 May 2006

The "P" in NPR

When the radio voice says "NPR; National Public Radio" he stresses the word "Public". As if to reassure me that my donation is allowing any old underprivileged American to access their quality radio programs.

But when I try to listen on the Internet to a radio show recommended by a friend, using my free operating system of choice, I am in for half an hour of searching for a working media player. I even considered installing a product from one of my least favorite companies. The company I don't like sent me on a wild goose chase to an open source real media player that has an ubuntu package but when I tried to open this stream it gave me the error "The following components are required: protocol_rtsp_rdt". Eventually, I just gave up.

I'll resume my monetary support of NPR when they support me and my fellow linux/ubuntu users by releasing content in an open format such as ogg or mp3.

posted at: 06:27 | path: | permanent link to this entry

Thu, 11 May 2006

TwinView vs Xinerama

When I set up my dual monitor workstation, I was in a bit of a rush. I cobbled together an xorg.conf file for my ubuntu breezy workstation, got it so it looked right and didn't think much about it for 5 months.

Over that time, I noticed that window drawing was surprisingly slow for my state-of-the-art workstation. OpenGL screensavers -- which I expected to run reasonably fast with my modern-if-not-gamer-quality Nvidia Quadro NVS 280 PCI-E card -- ran at a pace reminiscent of Mesa.

So yesterday, I did some googling and came upon TwinView. I set it up with a simple device section in xorg.conf:

Section "Device"
	Identifier	"NVIDIA 1"
	Driver		"nvidia"

        Option          "TwinView" "1"
        Option          "MetaModes" "1600x1200,1600x1200"
and, suddenly, everything is snappier. Most importantly, my screensavers look better. Now does anyone know how to convince xscreensaver to display 1 hack across both screens?

posted at: 23:17 | path: | permanent link to this entry

powered by blosxom