Brown rice made easy

Yup, I’m posting what could loosely be called a “recipe”. These instructions will give you quality brown rice with the minimum of fuss.

  1. Measure 2.5 cups of water into saucepan with tight-fitting lid, and bring to boil. Add 1-2 tsp of butter or olive oil (optional). Salt to taste
  2. Stir in 1 cup of brown rice
  3. Cover saucepan, lower the heat, and simmer for 35-40 min (until moisture is absorbed)
  4. Remove from heat, allow to sit for 5 min. Fluff with fork

Go forth and starchify.

Convert .webloc files to a Markdown list

I have a bunch of bookmarks I was keeping in folders on my Mac as .webloc files. I still want the bookmarks, but I don’t want all these tiny files cluttering up my drive, so I wrote a quick script called webloc2md. The script takes a single argument, the target directory, and outputs the links as an unordered list formatted with Markdown. The list is output directly, you can pipe it into the file of your choice.

One caveat: the .webloc files must be in XML format. If not, the script will skip them, and output a warning as the last list item. You can use the program plutil to do the conversion. To convert all the .webloc files in the current directly, type plutil -convert xml1 *.webloc.

You can grab the script from my GitHub account.

Testing in IE on a Mac is easier with Modern.ie

Microsoft recently launched a new site called Modern.ie that seeks to simplify testing against multiple versions of Internet Explorer. There’s a code parser/validator (that cheekily flags missing IE-only HTML as warnings), and a way to get three months of free testing at BrowserStack. Far more interesting and valuable; Microsoft have finally released official IE testing virtual machines that work with VMWare and Virtual Box. This means there’s a supported, no-cost way to test IE on your Mac and Linux boxes. There are combinations of IE7 and up under Vista and newer. Some of the downloads are huge, so make sure you’re sorted for time and space.

Weekly link dump

The Sunday Papers at Rock, Paper, Shotgun

This is the blog post I most look forward to all week. The editors pull together the most interesting game coverage from the previous week, and add some commentary. Topics include reviews, industry news, and even proper critical theory from time to time.

Sublime Text 3 Beta Released

Nettuts+’s coverage of the beta of this increasingly popular editor. The ability to jump between symbols and their definitions will save lots of folks a tonne of time. Also potentially useful if you’re reading through source for educational purposes.

Stack-Ed

A searchable list of the best contributors to Stack Overflow sites, sorted by topics. Click on the user’s name to get a list of their best answered questions on your chosen subject.

JQuery function to absolutely position elements in a table cell

While table cells in HTML may look like block elements, they’re not, and thus you can’t absolutely position things inside them. I’ve been using a script that I’ve had for ages to get around this. The script would add a helper div around the contents of every cell that was relatively positioned. The benefit of my old script was that it was library independent. The drawback was that it was long, I don’t know who wrote it, it added a div to every TD and TH, and it resisted all efforts to make it target only tags with specified classes.

I retired that script today in favour of iWouldLikeToAbsolutelyPositionThingsInsideOfFrickingTableCellsPlease() over at CSS-Tricks. I renamed it to cellPos(), though.