pwexport

Posted on Sat, 30 Jan 2010 in Technology
I made a command line password exporter for firefox.

Everglades

Posted on Wed, 2 Dec 2009 in Random
Last edited Wed, 2 Dec 2009

The Thing That Should Not Be

Posted on Tue, 17 Feb 2009 in Technology
Last edited Tue, 17 Feb 2009

This may be the most abominable and utterly insane function I have ever had the misfortune to write.

function oct = octify (n) 
    oct = sscanf (sprintf ('%o', n), '%d');
end
Thanks Matlab!

(Nearly) Perfect Lemon Chess Pie

Posted on Sun, 8 Feb 2009 in Food
Last edited Mon, 9 Feb 2009

I've been homing in on the perfect recipe for lemon chess pie. I think I've made about six of them. Here's the best one I've made so far:

For the crust:

  • 6 ounces by weight of all purpose flour
  • one stick of very cold butter
  • 1/2 teaspoon table salt
  • very cold water. (I use a bar shaker to chill the water).

For the filling:

  • 4 eggs
  • 1.5 cups sugar
  • 5 tablesppons melted butter
  • 3 tablespoons cornmeal. (I may use only 2 next time)
  • juice and zest of two lemons
  • a pinch of salt

Preparation:

Preheat the oven to 425. Combine the flour and salt. Cut the butter into the flour mixture with a pastry cutter. Do not use a food processor. The butter chunks should be roughly pea sized. Put the ice cold water into a spritz bottle. Spray it on the flour mixture, toss the mixture, and spray again. Continue spraying and tossing until the mixture comes together as a dough when you squeeze it in your hand. It should still be somewhat crumbly. Wrap it up in tin foil and press it flat. Leave it in the fridge for at least half an hour. When you take it out it should be a good deal more dough-like. Form the dough into a ball, trying to work it as little as possible. You may have to knead it a few times to work in the crumbly bits, but the less kneading, the better. Roll it out into a crust. You'll need to frequently apply four and flip the dough to avoid stickage. Put the crust in your pie pan, and dock it with a fork. Cover it with parchment paper and cover the parchment paper with pie weights, or dry beans, or rice. Bake it for ten minutes. Take off the weights and parchment and bake it until it's just starting to brown, about another 10. Take the crust out and let it cool completely.

Lower the oven temperature to 350. Once the crust is cool, beat the eggs and whisk in the rest of the filling ingredients. Fill up the pie. You probably don't need the whole batch of filling. It's very lemony and rich so you really only want a thin layer. I think I used about 2/3 of it. Bake it until the top is slightly browned and a knife comes out clean, about 30-35 minutes. Let the pie cool completly before eating.

Bay Leaves

Posted on Sun, 18 Jan 2009 in Food
Last edited Sun, 8 Feb 2009

I smelled bay leaves for the first time in my life today. I've been putting them in my food for years out of nothing more than habit. Before today they smelled like nothing. The bay I smelled today smelled amazing. I bought it at a spice store called Penzy's. I think I'm going to start throwing all my spices out and replacing them with fresh ones from there.

Sweet Limes

Posted on Mon, 24 Nov 2008 in Food
Last edited Sun, 8 Feb 2009

I found an odd fruit at the grocery store today labeled a "sweet lime". They look like lemons, and the juice has a sweet, mild lemon flavor without any tartness. I tried cutting them into wedges and eating them like an orange, but I wouldn't recommend that. The pulp is fibrous and bitter. It's best to just use the juice.

Customizing Firefox (without sputtering with rage)

Posted on Wed, 13 Aug 2008 in Technology
Last edited Wed, 13 Aug 2008

If you have ever tried to figure out how to add a custom keybind to Firefox, you know it is a frustrating, infuriating, and futile task. There is no reasonable way to do it. There's a way that seems to have worked six years ago, and requires you to edit the firefox installation instead of your profile. There's extensions that might add the keybinds you want, but they all suck in one way or another. There's an extension that lets you add keybinds with the GUI, but it stores them in your user prefs so there's no way to sync them between machines. You could make your own extension, but then you have to figure out all the stupid boilerplate that extensions require and reinstall it every time you make a change.

All I really want is a text file somewhere I can edit. When I add a binding to emacs, I add a single line to a single text file. The file is in a git repository, so syncing changes is easy. This blissful state of affairs actually can be achieved in firefox; and here's how you do it:

Firefox can load an extension from a path outside the profile directory. So you just create an extension with your personal customizations, and just edit it directly. After you make a change you just restart firefox. There's no need to make a XPI and install it. I keep mine in ~/config/dot-firefox. Aside from the boilerplate, there's just two files.

overlay.js for your javascript:

// from mozless
function tabRelativeSelect(delta)
{
  var oldTab = gBrowser.selectedTab;
  var newTab = null;
  var length = gBrowser.tabContainer.childNodes.length;
  var index;
  for (index=0; index<length; index++) {
    if (gBrowser.tabContainer.childNodes[index] == oldTab) {
      var new_index = index + delta;
      if (new_index < 0) new_index += length;
      else if (new_index >= length) new_index -= length;
      newTab = gBrowser.tabContainer.childNodes[new_index];
      break;
    }
  }
  if (newTab && newTab != oldTab)
    gBrowser.selectedTab = newTab;
}

and overlay.xul for your XUL:

<?xml version="1.0"?>

<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script src="overlay.js"/>
  <keyset id="mainKeyset">
    <key key="k" oncommand="goDoCommand('cmd_scrollLineUp')" />
    <key key="h" oncommand="goDoCommand('cmd_scrollLeft')" />
    <key key="j" oncommand="goDoCommand('cmd_scrollLineDown')" />
    <key key="l" oncommand="goDoCommand('cmd_scrollRight')" />
    <key key="d" oncommand="goDoCommand('cmd_scrollPageDown')" />
    <key key="u" oncommand="goDoCommand('cmd_scrollPageUp')" />
    <key modifiers="shift" key="B" oncommand="BrowserBack()" />
    <key modifiers="shift" key="F" oncommand="BrowserForward()" />
    <key key="." oncommand="tabRelativeSelect(1)" />
    <key key="," oncommand="tabRelativeSelect(-1)" />
  </keyset>
</overlay>

To get firefox to load it:

$ echo ~/config/dot-firefox > $firefox_profile_dir/extensions/dot-firefox@elder-gods.org

If you wanna see/copy the boilerplate, it's all in this git repo.

feedshow.com

Posted on Wed, 26 Mar 2008 in Random
If you know anything about this website please send me an email and tell me about it. Thanks.

Tuber Indicum

Posted on Sun, 16 Mar 2008 in Food
Last edited Sun, 8 Feb 2009

I gave some canned Chinese truffles the same treatment as the Oregon blacks. Don't bother with these. They have almost no smell and no taste at all.

Kototbuki again

Posted on Sun, 16 Mar 2008 in Food
Last edited Sun, 8 Feb 2009

Kotobuki is tiny. It's a converted townhouse that maybe seats 25 people. There's a stairway from the entrance up to the restaurant. This stairway is filled with people waiting to get in. If you don't want to wait, or if you have a big group, don't go here; but believe me the food there is worth waiting for. Once you get in the service is quick. There were four sushi chefs behind the counter and they were constantly busy, because there's also a constant stream of people picking up takeout orders. Except for a few appetizers (which are great), all kotobuki serves is sushi and sashimi. You can order a combo plate with some pre-chosen selection of sushi, but I really suggest you just get everything a la carte. They give you a little menu and you just mark down what you want on that. Most nigiri here are only one dollar. The uni and toro are $2.50. It's all super-fresh and delicious. The only thing I really didn't like was the crab, which was "krab". My favorites were the eel, the toro, the scallop and the monkfish liver. But really it was all great (except the krab). Like I said, the best sushi I've had. Also the cheapest; which is kinda strange.

(let ((x (quote (quasiquote (let ((x (quote (unquote x)))) (unquote x))))))
  (quasiquote (let ((x (quote (unquote x)))) (unquote x))))