Pesto Tilapia on Tomato Risotto with Roast Asparagus

I made enough for 4 this time because I wanted left overs to pack for lunch.

The tilapia was 1/2 pound rubbed with pesto from a squeeze tube, then fried. I didn’t love the flavor, and if I were to try fish like this again, I’d pick a different white fish, possibly haddock. Otherwise I might go with pesto chicken.

The risotto was very well like though. The main difference (from last time) was what I used for a liquid. From memory:

  • 1 cup tomato sauce (1 can)
  • 1/2cup wine.
  • 2.5 cups chicken stock.

Also, before I put the rice in butter, I first put 1/2 onion and 2 cloves garlic, both  minced, in the pan and softened them in butter.  This would be a fairly typical thing to do, but when I posted about risotto last time, I had been out of onions and thus didn’t include it.

After coating the rice with butter, continue preparing normally.  That means add a little liquid, then stir till it is absorbed, and repeat.  Keep doing this until it has a texture you like, probably about 20 minutes, and you probably won’t use all the broth you made.  Near the end add 2 Tbps of tomato paste.  Then add parmesan to taste.

About ReferURL is a link shorting service I created. You paste in a long URL (say to an eBay auction or newpaper article) and it gives you a short URL to use ( You also have the option of picking an alias for a referurl, something like Also, a common usage pattern is a bookmarklet that you drag from the page to the toolbar. Whenever you click on the bookmarklet, it runs a bit of javascript code that submits the page you are currently looking at to ReferURL.

URL shortening services are great for emailing URLs to friends. Recently they are even more important for posting URLs on twitter (with only 140 characters, every character saved counts).

A service that does similar things called has been around for a long time. Personally, I do not like I think it is ugly. There is another reason I remember disliking them, but it is possible that I have two services confused, so I won’t mention it. They also didn’t offer aliases when I wrote ReferURL.

I used to use another service, but it broke repeatedly, then when it had several months of downtime I decided to write my own. That service also didn’t support aliases.

At this point when I look around the new services that are similar, I see three things that may be better than ReferURL.

  1. Some services are prettier (of course, extra graphics means slower load times).
  2. Some services put the new shorter url into your clipboard buffer so that you don’t have to copy it yourself. I would love to add this, but as far as I can tell it is implemented with Flash, which I don’t own.
  3. With twitter, every character counts. There are now some services with names much shorter than is one character shorter. is six characters shorter. If any one has an good idea for a name that is shorter than, I would love to steal it. In my own twitter usage, I haven’t had trouble with the length of ReferURL yet though.

Anyway, those are my comments on the creation of For the time being, I plan to keep looking for ways to improve it and will keep working on it.

Also, I will be releasing the code for people who want to run/write their own service in the future. I had previously released some code, but now that it is several months old, I took it down until I had time to clean the current code for re-release. If someone were to email me asking about that, it would probably get me to do it sooner.  It is a Python project build on mod_python and PostgreSQL.

SunPCI on Solaris 9

I just imported this page because I don’t want to forget the information. If you don’t know why you need to read this, then feel free to ignore it.


The SunPCI is a 400mhz AMD k62 card for running Windows in a PCI
Sun. Never versions of the card are the SunPCI-II and the SunPCI-III,
both of which use higher speed Celerons.


The original SunPCI was dropped after version 1.3 of the SunPCI
software (both 1.3 and newer versions are obtainable from Sun’s web
site, registration required). Version 1.3 of the SunPCI software isn’t
supported on Solaris’ newer than 8. Thus this page on making it work on
Solaris 9.

I doubt that it is possible to use this card with Solaris 10.

Important Requirement (that wasn’t immediately obvious to me)

One requirement that the software has is that it can only display on
the Sun X server. This means that you need to either need a framebuffer
in the same machine as the SunPCI, or you need to be remotely displaying
the software on another Solaris machine running the Sun X server.
Thankfully, framebuffers for almost every machine are rather cheap.

Presumably if you still want remote display on a different X server
(say, Xsgi, which is what I want), you could use VNC or Remote Desktop
on the Windows system. You still would need a graphical console to
run the SunPCI, but this could be a case of attaching a monitor to a
Sun in the basement to start the software, then using RDesktop from
your office to operate the Windows session.

When I started trying to set this up, I had only headless Sun machines, and I thought I could run this on one of them.  Oops.


Install the software as normal. It will fail trying to run the
postinstall script, complaining about “/etc/ not updated
correctly”. The first thing to do is to:

  • cd /opt/SUNWspci/drivers/solaris
  • ln -s /opt/SUNWspci/drivers/solaris/sunpcidrv.280 sunpcidrv.290
  • ln -s /opt/SUNWspci/drivers/solaris/sunpcidrv.280.64 sunpcidrv.290.64

You will also need to make sure your OBP is new enough. I don’t know
what is required exactly. Perhaps 3.11. 3.9 seems to be rather common
and is too old. 3.27 seems to be the latest, and likely last version.
New versions can be downloaded from sunsolve.

Additional notes

Google Groups article with some additional notes that I didn’t require.

Also, from a german site, I got this:

d) If SunPCi still gives you trouble, edit:
and add...

I haven’t needed it either.

Poached Egg on Risotto with Spinach and Bacon

The goal was to have something more than frozen pizza, or reheated spaghetti and meatballs, using only stuff on hand.  Using up the spinache before it went bad was a nice benefit.  I bought a lot of vegatables at the beginning of the week and haven’t been using them as quickly as planned.  Now, I still need to use up the beans (uncooked, from the pack bought for the maple salmon) in the near future.

Once again, I cooked after dark.  This time it was indoors, but natural sun light would have helped the pictures I think.  I ended up not using any but one final.


  • 3/4 cups chicken broth or stock
  • 1/4 cup dry white wine
  • 1 cup parmesan broth
  • 1 tablespoons butter
  • 1/2 cups Arborio Rice
  • wilted spinach
  • crumbled bacon
  • 4 eggs
  • water
  • vinegar
  • 2 tablespoons grated parmesan

Note on order:

Both poached eggs and risotto are best served immediately.  I feel
that is slightly more important for the eggs, so I start the risotto
first, then do the eggs about 10 minutes into the stirring in the
liquid stage of the risotto.  Finished eggs are store in a covered
bowl in the microwave to preserve their warth.  Since the risotto
should finish first, I leave it covered off the burner to keep it warn.

The parmesan broth:

Boil 1 cup water.  Add parmesan rind and a few pepper corns, simmer
for a few minutes.  Strain.

To wilt the spinach, I use a minimal amount of olive oil in a pan,
then add the spinach and toss some salt and pepper on top.


Contrary to popular reports, you don’t have to stir constantly.  You
do need to stir alot though, and you also need to watch constantly.

Mix liquids together and warm them.

In a heavy sauce pan, melt butter.  Add the rice, add stir with spoon
until grains are coated.  At this point you will start adding liquid
to the rice a few tablespoons at a time.  After each addition, keep
stirring the rice until the liquid is completely absorbed.  Expect
this process to take about 18 minutes.  Stop when rice is al-dente.  I
like the risotto to be soft enough that they don’t resist biting, but
not so soft that you can’t feel the grains in your mouth.

Salt and pepper to taste.

When the risotto is complete, stir in the spinach and bacon.

Poached Egg (If you know how, skip this):

First, you need a pan that will allow you to have 5 inches of water
while staying at least 1.5 inches from the top of the pan.  Fill the
pan so that you have 5 inches of water.  Add a tablespoon of white
vinegar.  Bring the water to a simmer (200 degrees).

Spin the water with a ladle handle.  Drop an egg in the center.  Leave
it for 3-4 minutes.  It will look messy until you remove the egg.  You
might consider watching a few tutorial videos on youtube.  That’s what
I had to do.  No amount of reading explanations made me realize that I
just needed to wait long enough before removing the egg, then trust
that it would look OK when served.

Also, be prepared to waste a few eggs practicing.  They aren’t that


Put risotto in individual bowls, then place eggs on top and sprinkle
with a dash of salt, parmesan, and ground pepper.

Must have Emacs Mode

If you ever edit javascript code, the only emacs mode to consider is Steve Yegge’s JS2 mode.  The official page for it is here.  The annoucement page is here.  This javascript mode is an example of what more modes should aspire to.  It parses your buffer into a javascript AST and uses that for syntax highlighting, and also to check for syntactic correctness, helping to prevent you from having bugs caused by typos.  This is a lot faster than having to load the code into a web browser to find out that you missed a ‘;’.

It also provides Javascript code navigation.  Some other modes have this, like python mode (but not C-mode, at least not by default), but I wish all modes had it.

I wish someone would copy this strategy for a new C mode or Python mode.

Making Soy Maple Salmon with Sauted Green Beans

I had planned to make teriyaki shark tonight because shark was advertised on sale.  I bought the beans yesterday.  When I tried to buy the shark today, I found that they were sold out for the day (but might have more tomorrow, even though technically this was yesterday based on what the clock reads), so I bought Salmon instead since I didn’t want to give up plans of having fish.

I then proceeded to cook and attempt to take pictures after dark.  And this was actually a somewhat early time.  I had to pick my car up from the shop, so I used that as an excuse to leave work early.

For the recipe, look here.

Final dish, plated on our picnic table.

Green beans, blanched and coated in oil and soy sauce.

Salmon, salted and peppered.

Green beans on the side burner of my grill.  Deb was trying to capture dramatic flames from the oil spritzing over the side as I shook the pan.

Salmon on the upper rack of the grill.

Soy-maple Glazed Salmon, with Sauted Green Beans, Recipe


  • 2 boneless salmon fillet, serving size (could be a good bit more)
  • Salt + pepper


  • 2 tablespoons maple syrup
  • 1 tablespoons soy sauce + extra for beans
  • 1 tablespoons melted butter
  • 1 tablespoons fresh lime juice
  • 1/2 teaspoon lime zest
  • chopped fresh chives
  • lemon wedges


  • Green beans, enough to serve the number of people eating.
  • 1 tablespoon sesame oil
  • 1 tablespoon vegetable oil
  • 1 tablespoon soy sauce


Remove the tips and stems.  Cut into 3 in. sections.  Blanch them (1 minute or less in boiling water).  This probably takes long enough that you might as well do it before preheating anything.

Preheat the grill for medium-high heat and lightly oil grate (I used the upper rack, but if you don’t have an upper rack, then lower the temperature).  Also preheat your bean pan (cast iron is great, heavy stainless steal is also good, a non-stick pan is bad because they break down at high heat) on high.  This works nicely if you have a cook side burner next to your grill.

Whisk together the maple syrup, soy sauce, butter, lime juice, and lime zest.

Season the salmon fillet with salt and pepper, and put a spoon full of sauce over it to marinate for a few minutes.

Dry beans, then oil lightly with equal parts sesame oil and vegetable oil.  Drizzle with soy sauce.

Place skin-side down on either the upper shelf, or reduce the grill temperature.  Close the lid on the grill for 5 minutes.  Baste the salmon and close again.  While waiting on the salmon, reduce the glaze lightly, until it coats the back of a spoon.  Continue cooking until the salmon flakes easily with a fork and is 140 deg.   Just before removing, add a bit more glaze.

In the very hot preheated pan , toss the beans in, and shake frequently to prevent sticking.  Beans will cook very quickly.  However, they can be warmed if you want to complete them before the salmon is completed.
Serve  the salmon, lightly drizzled with thickened glaze. Place beans next to salmon.  Garnish with chopped fresh chives and lemon wedges.

If you are wondering about the non-stick pans, DuPont (according to Google) says their maximum recommended use is only about 500 degrees Fahrenheit.  They also say they will suffer significant decomposition above 660.  Cooks Illustrated (sometime in 2005, but I didn’t dig up the issue to quote), the Environmental Working Group, and I believe Alton Brown, independently say that a pan can overheat (700 deg according to the EWG) in as little as 5 minutes when used on high heat, and that toxic and carcinogenic gasses can be detected at those temperatures.

Mail Configuration with Postfix and Dovecot

(NOTE in 2011: This one post attracts enormous amounts of spam comments, so I’m closing comments on it, while still leaving comments on elsewhere.)

Notes on configuring a SMTP/IMAP server with TLS, SSL, and SMTP AUTH, the least pain possible.

The platform used was Solaris 10 with SunStudio 11. The notes should apply to any reasonably recent unix-like operating system, although Linux users in particular may find it easier to just install the setup from their prefered package management system. I will note any place that is likely to contain Solaris specific stuff.

The main pieces used are Postfix and Dovecot.

A quick note: TLS is basically SSL

About SASL

Postfix requires an external SASL library to use for SMTP AUTH. The normal choice is Cyrus SASL, which has been around for some time. Cyrus SASL is difficult to build on Solaris with SunStudio, and is generally a much hated library.

Starting with Dovecot 1.0, Dovecot now has it’s own SASL library. This is much easier to use. The only downside is that when doing Postfix to Postfix SMTP AUTH connections, the client copy of Postfix can’t use Dovecot SASL. If your installation of Postfix is always going to be a SMTP AUTH server and never a client, then please use Dovecot SASL.


Compile with:

./configure --prefix=/opt/dovecot --with-pgsql --with-gssapi \
          --with-ssl=openssl --with-gc

gssapi still doesn’t seem to work for me, and I’m not actually using pgsql, so I could have left it off as well.


At this point, all you have to do is edit the dovecot.conf file. I don’t have anything but plain authentication working correctly. I can get CRAM-MD5 working, but then plain won’t work, at least with mutt. I make up for this by requiring the non-localhost imap connections use SSL, and by later setting postfix to only allow SMTP AUTH over TLS. I accomplish the imap/SSL requirement with a firewall rule.

Find the commented protocols line and uncomment, set to “protocols = imap imaps”. This disables POP usage. Add pop and pops if you wish.

Set the ssl_cert_file and ssl_key_file lines in your dovecot.conf file. Search elsewhere for a guide on creating the key. I reused the same key that I created for apache/ssl usage.

Set the mail_location line to “mail_location = maildir:~/Maildir”.

Adjust the first_valid_uid line, if needed. I set mine to: “first_valid_uid = 100”.

Find the “auth default” section. Change the mechanisms line to: “mechanisms = plain login”. In the passwd pam { second, find the commented out args line, and change it to “args = /etc/pam.conf”.

Still in the auth default section, find the commented out “socket listen” section. Uncomment the first line to: “socket listen {“. Then scroll down to the client section, and uncomment the non-descriptive lines and change to:

    client {
      # The client socket is generally safe to export to everyone. Typical use
      # is to export it to your SMTP server so it can do SMTP AUTH lookups     
      # using it.                                                              
      path = /var/spool/postfix/private/auth
      user = postfix
      group = postfix
      mode = 0660


Start up dovecot. Under Solaris 9 or linux, I added it to the rc.local file (on some systems I had to create a rc.local system to do so). On Solaris 10, find a manifest and method here and here.. To install these files, copy the manifest to /var/svc/manifest/site and the method to /lib/svc/method and install them into SMF with the command:

svccfg import /var/svc/manifest/site/imap-dovecot.xml



Very simple. In the expanded source directory, “./configure && make && sudo make install”.


To build:

   -I/usr/local/ssl/include' \
   AUXLIBS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib -lssl -lcrypto" \

Non-solaris users can omit the -R option, and the CC option.


The primary options that need set are to append to the end:

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/your.crt
smtpd_tls_key_file = /etc/ssl/your.key
smtpd_tls_loglevel  = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may


Additionally, find the mailbox_command section and set:

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/your.crt
smtpd_tls_key_file = /etc/ssl/your.key
smtpd_tls_loglevel  = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may

smtpd_recipient_restrictions =


Additionally, find the mailbox_command section, and set:

mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir


Also set: myhostname, mydomain, mydestination.

Follow other guides for setting up things like spam checking, or mailman.

PostgreSQL Notes

I don’t use Postgres quite heavily enough to remeber how to do certain administrative tasks. Having gotten sick of flipping back and forth between various sections in the manual, I’m making a page of notes here.

Anything here is probably permenantly burned in the brains of heavier users, but perhaps this will be useful to other light users.


Postgres generally runs as a dedicated user, and that dedicated user probably has complete control over adding roles and dbs.

To use postgres as a specific user, “psql -U username” is easier than su’ing to that user (and the postgres user you want may not be a system user anyway.

Creating a DB

createdb -U postgresuser newdbname

Adding a User

Users are just roles that can login.

createuser -P newusername

The -P flag is to tell it to set a password. It is possible to have accounts without passwords.

To see the users, from inside psql, do \du.

Assigning the DB to a user

This is night the same as granting rights to users (see the GRANT command), although the DB owner does have full rights in the DB.

alter database dbname owner to username;

Acurately predicted 20 out of the last 4 Zebra stampedes.