<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>log(p)</title><generator>Tumblr (3.0; @pkruithof)</generator><link>http://pkruithof.tumblr.com/</link><item><title>Custom Google Maps Marker Maker</title><description>&lt;a href="http://powerhut.co.uk/googlemaps/custom_markers.php"&gt;Custom Google Maps Marker Maker&lt;/a&gt;: &lt;p&gt;Very nifty: upload your custom marker image, and it creates a shadow file, and the shape coordinates. Even creates a sprite containing the marker and shadow.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/26897555514</link><guid>http://pkruithof.tumblr.com/post/26897555514</guid><pubDate>Tue, 10 Jul 2012 12:23:02 +0200</pubDate><category>note to self</category><category>google maps</category></item><item><title>How to disable logging in a Symfony2 application</title><description>&lt;p&gt;Symfony&amp;#8217;s logging component is great: it provides a highly customizable way to log exactly what you want, where you want it, the way you want it (even with &lt;a href="http://www.firephp.org/"&gt;FirePHP&lt;/a&gt; support). By default, a lot of information is being logged on development environments: both the kernel and DBAL do a great job of granulized logging.&lt;/p&gt;
&lt;p&gt;On production environments, the default log setting is changed to a &lt;em&gt;fingers crossed&lt;/em&gt; strategy, which means: don&amp;#8217;t log anything until a certain severity threshold is reached. Really smart since you don&amp;#8217;t really need to log successful requests, but do want to inspect logs when something went wrong.&lt;/p&gt;
&lt;p&gt;There are situations however, where you want to minimize (or completely disable) logging. In my case, I had a large import which I implemented in a &lt;a href="http://symfony.com/doc/current/components/console.html" title="The Console Component  Symfony Docs"&gt;Command&lt;/a&gt;. Everything was working fine on my dev environment, but I got memory_limit errors on production. I figured this was because of the fingers crossed strategy, which requires every logged message to be stored in memory.&lt;/p&gt;
&lt;p&gt;So I dug into the Monolog internals, and figured out that disabling the log is really easy. You just push a &lt;a href="https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/NullHandler.php" title="NullHandler source on Github"&gt;NullHandler&lt;/a&gt; on the stack, which catches every message that is logged, preventing other handlers to log it. I found two services being responsible for almost all logging:&lt;/p&gt;
&lt;pre&gt;foreach (array('monolog.logger.doctrine', 'logger') as $service) { 
    $logger = $container-&amp;gt;get($service); 
    $logger-&amp;gt;pushHandler(new \Monolog\Handler\NullHandler());
}
&lt;/pre&gt;
&lt;p&gt;After doing this, nothing was being logged anymore, at least not in my case/configuration, YMMV.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/23096429066</link><guid>http://pkruithof.tumblr.com/post/23096429066</guid><pubDate>Tue, 15 May 2012 11:25:38 +0200</pubDate><category>symfony2</category><category>logging</category></item><item><title>What is Symfony2?</title><description>&lt;a href="http://fabien.potencier.org/article/49/what-is-symfony2"&gt;What is Symfony2?&lt;/a&gt;: &lt;p&gt;Great article, describing two things:&lt;/p&gt;
&lt;h2&gt;1. The web is not MVC&lt;/h2&gt;
&lt;p&gt;This is something I have been thinking about for years now, but I never fleshed out my thoughts about this. This pretty much sums up all my thoughts about this subject:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;the MVC word is so overloaded and because nobody implements exactly the same MVC pattern anyway. The &lt;em&gt;separation of concerns&lt;/em&gt; is all I care about.&lt;/p&gt;
&lt;p&gt;[…]&lt;/p&gt;
&lt;p&gt;I don’t like MVC because that’s not how the web works. &lt;em&gt;Symfony2 is an HTTP framework&lt;/em&gt;; it is &lt;em&gt;a Request/Response framework&lt;/em&gt;. That’s the big deal. The fundamental principles of Symfony2 are centered around the HTTP specification.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;2. Why Symfony2?&lt;/h2&gt;
&lt;p&gt;Why use Symfony2 as opposed to other frameworks out there? Because it’s awesome: the Doctrine ORM is awesome, the template engine is awesome, the console is &lt;strong&gt;really&lt;/strong&gt; awesome, the documentation is very extensive, the performance is superb…I’ll stop here, just read it and try it for your next project, I highly recommend it.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/11903809513</link><guid>http://pkruithof.tumblr.com/post/11903809513</guid><pubDate>Tue, 25 Oct 2011 12:51:37 +0200</pubDate><category>symfony2</category><category>php</category></item><item><title>MacPorts vs. Homebrew</title><description>&lt;p&gt;The past few months I saw more and more mentions of &lt;a href="http://mxcl.github.com/homebrew/"&gt;Homebrew&lt;/a&gt;, as an alternative to &lt;a href="http://www.macports.org/"&gt;MacPorts&lt;/a&gt;. When setting up a new Lion install, I figured it was worth checking out, see if &lt;a title="Homebrew vs. MacPorts  on tedwise.com" href="http://tedwise.com/2010/08/28/homebrew-vs-macports/"&gt;all&lt;/a&gt;&lt;a title="Moving from MacPorts to Homebrew  on bitboxer.de" href="http://bitboxer.de/2010/06/03/moving-from-macports-to-homebrew/"&gt; the&lt;/a&gt; &lt;a title="MacPorts to Homebrew : New Packaging system for Mac OS X  on Abhinay's Blog" href="http://abhinay.wordpress.com/2010/01/02/macports-to-homebrew-new-packaging-system-for-mac-os-x/"&gt;positive&lt;/a&gt; &lt;a title="MacPorts vs. HomeBrew  on terrychay.com" href="http://terrychay.com/article/macports-vs-homebrew.shtml"&gt;posts&lt;/a&gt; were true. The supposed benefits of Homebrew:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Homebrew installs packages into their own isolated prefixes and then symlinked into /usr/local.&lt;/li&gt;
&lt;li&gt;It uses the libs that are already installed on your mac.&lt;/li&gt;
&lt;li&gt;Way better command line user interface&lt;/li&gt;
&lt;li&gt;Homebrew and it’s installation scripts are hosted at &lt;a href="http://github.com/mxcl/homebrew"&gt;Github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The installation scripts (aka recepies) and Homebrew itself are written in ruby.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Some benefits can be discarded right away:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;The installation scripts are written in Ruby: So? It&amp;#8217;s easy to understand &lt;a title="Portfile of PHP5 on MacPorts" href="https://trac.macports.org/browser/trunk/dports/lang/php5/Portfile"&gt;a portfile&lt;/a&gt;. Maybe easier than Ruby even (if you don&amp;#8217;t happen to know the language).&lt;/li&gt;
&lt;li&gt;Packages are installes into an isolated prefix: Ports are installed in &lt;code&gt;/opt/local/&lt;/code&gt;, which on my machine only has MacPorts, pretty isolated I&amp;#8217;d say.&lt;/li&gt;
&lt;li&gt;It&amp;#8217;s hosted at Github: granted, I love Github, but MacPorts is still available on a&lt;a href="http://svn.macports.org/repository/macports/"&gt;public repository&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The command line user interface of Homebrew is colored, which is an advantage over MacPorts, but other than that, I have no problems with MacPorts&amp;#8217; CLI: it&amp;#8217;s just as easy to type &lt;code&gt;port install php&lt;/code&gt; than &lt;code&gt;brew install php&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That leaves one advantage: it uses the libs that are already installed on your Mac. Clearly, this is a benefit, and MacPorts should look to adopt this behaviour.&lt;/p&gt;
&lt;p&gt;Given that Homebrew has no apparent disadvantages as opposed to MacPorts, I gave it a try. While it&amp;#8217;s a bit faster, and I&amp;#8217;m a sucker for a colored terminal, I ran into one dealbreaking issue, when installing a server:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;em&gt;mcrypt&lt;/em&gt; extension is missing. Please check your PHP configuration.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;OK, no problem. I ran into these types of issues frequently with MacPorts. Most of the time they were solved by running &lt;code&gt;port install php5-mcrypt&lt;/code&gt;. But not on Homebrew: I googled the issue and came across &lt;a href="http://blog.rogeriopvl.com/archives/php-mcrypt-in-snow-leopard-with-homebrew/"&gt;two&lt;/a&gt; &lt;a href="http://seancoates.com/blogs/php-53-on-snow-leopard"&gt;posts&lt;/a&gt; with solutions. Both solutions require me to manually download, configure and compile the extension and PHP itself. Wait, what? On MacPorts this is a one line install, but for Homebrew, this has to be described in a long post?&lt;/p&gt;
&lt;p&gt;If this is the Homebrew way of doing things, count me out. I did a search for available PHP extensions, and found only Solr. MacPorts has &lt;a href="http://pastebin.com/raw.php?i=qRW5Kte1"&gt;about 110 extensions&lt;/a&gt;, and all for PHP5.&lt;/p&gt;
&lt;p&gt;There is one very critical requirement for a package manager: a extensive list of available and up-to-date software. And by that standard, at least for now, Homebrew has its ass handed to it by MacPorts.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/9832285905</link><guid>http://pkruithof.tumblr.com/post/9832285905</guid><pubDate>Mon, 05 Sep 2011 15:20:35 +0200</pubDate><category>homebrew</category><category>macports</category></item><item><title>"To me, this suggests that while Microsoft is confident that they did their homework, they’re not..."</title><description>“To me, this suggests that while Microsoft is confident that they did their homework, they’re not actually confident in the product itself. Nor should they be, given the reaction.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://techcrunch.com/2011/08/30/we-need-an-invert-selection-button/"&gt;http://techcrunch.com/2011/08/30/we-need-an-invert-selection-button/&lt;/a&gt;&lt;/em&gt;</description><link>http://pkruithof.tumblr.com/post/9633047937</link><guid>http://pkruithof.tumblr.com/post/9633047937</guid><pubDate>Wed, 31 Aug 2011 20:22:33 +0200</pubDate><category>microsoft</category><category>windows</category><category>explorer</category><category>ribbon</category><category>ui</category></item><item><title>parislemon:

Apple’s vision for the future of computing versus...</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_lqpkztZTFY1qz4gevo1_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;img src="http://24.media.tumblr.com/tumblr_lqpkztZTFY1qz4gevo2_500.png"/&gt;&lt;br/&gt; &lt;br/&gt;&lt;p&gt;&lt;a href="http://parislemon.com/post/9558558373"&gt;parislemon&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Apple’s vision for the future of computing versus Microsoft’s vision for the future of computing.&lt;/p&gt;
&lt;p&gt;Any questions?&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://pkruithof.tumblr.com/post/9580281561</link><guid>http://pkruithof.tumblr.com/post/9580281561</guid><pubDate>Tue, 30 Aug 2011 09:26:54 +0200</pubDate><category>tech</category><category>apple</category><category>microsoft</category></item><item><title>Want a "Create ISO" item in your Finder context menu?</title><description>&lt;p&gt;I did.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;launch Automator&lt;/li&gt;
&lt;li&gt;create a new Service&lt;/li&gt;
&lt;li&gt;add a Shell-script task&lt;/li&gt;
&lt;li&gt;make sure input is passed as arguments (not stdin)&lt;/li&gt;
&lt;li&gt;paste this code:
&lt;pre&gt;&lt;code&gt;
DVDDIR=$1
OUTDIR=`dirname "$DVDDIR"`
DVDNAME=`basename "$DVDDIR"`
hdiutil makehybrid -udf -udf-volume-name "$DVDNAME" -o "$OUTDIR/$DVDNAME.iso" "$DVDDIR"
&lt;/code&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;At the end, you should have something like this (mine&amp;#8217;s in Dutch, sorry):&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lprki1hlrL1qcdlwn.png"/&gt;&lt;/p&gt;
&lt;p&gt;Save the workflow, and you should have a new item in your context menu.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/8776254185</link><guid>http://pkruithof.tumblr.com/post/8776254185</guid><pubDate>Thu, 11 Aug 2011 14:37:00 +0200</pubDate><category>os x</category><category>iso</category><category>dvd</category><category>automator</category><category>shell</category></item><item><title>Subversion: Ignoring directory contents in Eclipse</title><description>&lt;p&gt;Sometimes you want to have a directory in your repository, but you don&amp;#8217;t want that directory&amp;#8217;s contents to be committed. A cache directory is a perfect example of this: when you want to make sure that checkouts/exports have that cache directory, but you don&amp;#8217;t want developers to commit their caches.&lt;/p&gt;
&lt;p&gt;You can use the &lt;code&gt;svn:ignore&lt;/code&gt; property to achieve this. In Eclipse, right-click the folder and select &lt;code&gt;Team &amp;gt; Set Property&lt;/code&gt;. Set the property to &lt;code&gt;svn:ignore&lt;/code&gt;, the content to an asterisk, and make your you check the recursive checkbox, like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lo0ev9P0Q91qcdlwn.png"/&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s it! Don&amp;#8217;t forget to actually commit the folder to make this change effective. &lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/7378700080</link><guid>http://pkruithof.tumblr.com/post/7378700080</guid><pubDate>Fri, 08 Jul 2011 12:10:59 +0200</pubDate><category>eclipse</category><category>subversion</category></item><item><title>Recursively delete .svn directories</title><description>&lt;a href="http://codesnippets.joyent.com/posts/show/104"&gt;Recursively delete .svn directories&lt;/a&gt;: &lt;p&gt;Also created &lt;a title="Recursively delete .svn directories" href="https://gist.github.com/1066776"&gt;a gist&lt;/a&gt; for common delete operations like this:&lt;/p&gt;
&lt;script src="https://gist.github.com/1066776.js?file=delete_svn_dirs.sh"&gt;&lt;/script&gt;</description><link>http://pkruithof.tumblr.com/post/7296950472</link><guid>http://pkruithof.tumblr.com/post/7296950472</guid><pubDate>Wed, 06 Jul 2011 09:58:23 +0200</pubDate><category>note to self</category><category>shell</category></item><item><title>Cleaning up MacPorts</title><description>&lt;a href="http://simenhag.blogspot.com/2008/11/cleaning-up-macports.html"&gt;Cleaning up MacPorts&lt;/a&gt;: &lt;p&gt;&lt;h2&gt;tl;dr:&lt;/h2&gt;
&lt;pre&gt;sudo port clean --all installed
sudo port -f uninstall inactive&lt;/pre&gt;&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/5416435237</link><guid>http://pkruithof.tumblr.com/post/5416435237</guid><pubDate>Thu, 12 May 2011 10:10:15 +0200</pubDate><category>note to self</category><category>macports</category></item><item><title>Float or double for a MySQL column?</title><description>&lt;p&gt;This is one of those things I keep forgetting, no matter how many times I look it up. So I thought I saved myself the trouble of finding the same resource again and again:&lt;/p&gt;
&lt;h2&gt;tl;dr&lt;/h2&gt;
&lt;ul&gt;&lt;li&gt;If precision matters (say, with currency and/or calculations), use decimal; floating point numbers &lt;a title="The FLOAT and DOUBLE types represent approximate numeric data values." href="http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html#id829414"&gt;are approximate numeric data values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If you don&amp;#8217;t have too many digits (say, max 5), use float&lt;/li&gt;
&lt;li&gt;If you have many digits, use double&lt;/li&gt;
&lt;/ul&gt;&lt;h2&gt;The longer version&lt;/h2&gt;
&lt;p&gt;From the &lt;a title="MySQL: What's the difference between float and double?" href="http://stackoverflow.com/questions/2160810/mysql-whats-the-difference-between-float-and-double"&gt;always excellent StackOverflow&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#8220;They both represent floating point numbers. A &lt;code&gt;FLOAT&lt;/code&gt; is for single-precision, while a &lt;code&gt;DOUBLE&lt;/code&gt; is for double-precision numbers.&lt;/p&gt;
&lt;p&gt;MySQL uses four bytes for single-precision values and eight bytes for double-precision values.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And if you really want to go all out: here&amp;#8217;s a &lt;a title="What's the difference between a single precision and double precision floating point operation?" href="http://stackoverflow.com/questions/801117/whats-the-difference-between-a-single-precision-and-double-precision-floating-po"&gt;detailed explanation of single-precision vs. double-precision&lt;/a&gt;.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/4578259326</link><guid>http://pkruithof.tumblr.com/post/4578259326</guid><pubDate>Wed, 13 Apr 2011 14:05:58 +0200</pubDate><category>note to self</category><category>mysql</category><category>float</category><category>double</category></item><item><title>The Ultimate 'PNG for web' Guide (including tools)</title><description>&lt;a href="http://calendar.perfplanet.com/2010/png-that-works/"&gt;The Ultimate 'PNG for web' Guide (including tools)&lt;/a&gt;</description><link>http://pkruithof.tumblr.com/post/4022719539</link><guid>http://pkruithof.tumblr.com/post/4022719539</guid><pubDate>Tue, 22 Mar 2011 13:07:27 +0100</pubDate><category>png</category><category>note to self</category></item><item><title>CouchDB won't start after upgrading via MacPorts</title><description>&lt;p&gt;After doing a &amp;#8216;port upgrade outdated&amp;#8217; 2 days ago, I found out CouchDB wasn&amp;#8217;t running anymore after rebooting the next day. I&amp;#8217;ve spent hours of debugging this, which was hard considering the fact the logs stopped being appended to the day of the upgrade.&lt;/p&gt;
&lt;p&gt;After hours of Googling, I finally found &lt;a href="http://trac.macports.org/ticket/27686"&gt;this ticket&lt;/a&gt; which states that Erlang is no longer built with SSL enabled, which causes CouchDB not to start up (and not to log any errors why it doesn&amp;#8217;t).&lt;/p&gt;
&lt;p&gt;And so the solution is:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Uninstall erlang: port uninstall erlang&lt;/li&gt;
&lt;li&gt;Install erlang with ssl: port install erlang +ssl&lt;/li&gt;
&lt;li&gt;Reinstall couchdb: port uninstall couchdb &amp;amp;&amp;amp; port install couchdb&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Hopefully this will save someone else the time and trouble I went through&amp;#8230;&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/3325066661</link><guid>http://pkruithof.tumblr.com/post/3325066661</guid><pubDate>Wed, 16 Feb 2011 11:29:23 +0100</pubDate><category>couchdb</category><category>erlang</category><category>macports</category></item><item><title>Which character set to use when sending emails</title><description>&lt;a href="http://blog.wordtothewise.com/2010/03/which-is-better-utf-8-or-iso/"&gt;Which character set to use when sending emails&lt;/a&gt;</description><link>http://pkruithof.tumblr.com/post/2856937544</link><guid>http://pkruithof.tumblr.com/post/2856937544</guid><pubDate>Fri, 21 Jan 2011 14:59:21 +0100</pubDate><category>linkdump</category><category>note to self</category><category>charset</category><category>utf-8</category><category>mail</category></item><item><title>HTML5 Decepticons</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lf86dtXOpv1qd8nm8o1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;HTML5 Decepticons&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/2811935659</link><guid>http://pkruithof.tumblr.com/post/2811935659</guid><pubDate>Tue, 18 Jan 2011 16:44:17 +0100</pubDate><category>html5</category></item><item><title>Perfect inline links with separators</title><description>&lt;p&gt;Designers love this design: a couple of links, next to each other, separated by a character like a pipe symbol, or a dot, like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_le6otgpm0T1qcdlwn.png"/&gt;&lt;/p&gt;
&lt;p&gt;While designers and clients love it, developers mostly sigh, because of two reasons:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;The last separator is missing. To accomplish this, we often have to resort to a &lt;code&gt;class="last"&lt;/code&gt; &amp;#8216;hack&amp;#8217; which - while semantically correct - is rather superfluous markup.&lt;/li&gt;
&lt;li&gt;Using a border does not give the wanted look, it is too high, even when used on an inline element (like an anchor).&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;The following snippet might help you in your projects when you come across this typical design:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;li { display: inline; }
li:after { content: '|'; }
li:last-child:after { content: ''; }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Simple, right? The one caveat is the use of the &lt;code&gt;:after&lt;/code&gt; and &lt;code&gt;:last-child&lt;/code&gt; pseudo selectors, which won&amp;#8217;t work in some browsers (the usual suspects). Progressive enhancement teaches us that this doesn&amp;#8217;t matter; just provide enough margin between the links, and I&amp;#8217;m sure IE &amp;lt; 8 users think it looks fine.&lt;/p&gt;
&lt;p&gt;Your client however, perhaps doesn&amp;#8217;t. Which is why I highly recommend the use of the &lt;a href="http://selectivizr.com/"&gt;selectivizr&lt;/a&gt; script. This won&amp;#8217;t solve the lack of &lt;code&gt;:after&lt;/code&gt; support on IE versions lower than 8, but will fix the &lt;code&gt;:last-child&lt;/code&gt; selector, as well as enabling you to use this at other places. If that still doesn&amp;#8217;t satisfy your client, you&amp;#8217;re stuck to using extra markup or (background) images, sorry.&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/2510793081</link><guid>http://pkruithof.tumblr.com/post/2510793081</guid><pubDate>Wed, 29 Dec 2010 11:22:00 +0100</pubDate><category>css</category></item><item><title>Caching WebFonts in Firefox</title><description>&lt;p&gt;Two things I stumbled upon when trying to figure this one out:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Firefox needs a Content-Type header: it won&amp;#8217;t cache without one. The &lt;code&gt;application/octet-stream&lt;/code&gt; type doesn&amp;#8217;t work. Officially, the &lt;a title="Web Open Font Format page on Wikipedia" href="http://en.wikipedia.org/wiki/Web_Open_Font_Format"&gt;woff file format&lt;/a&gt; doesn&amp;#8217;t have a mimetype, &lt;a title="Mime types for the application media type" href="http://www.iana.org/assignments/media-types/application/"&gt;according to the IANA&lt;/a&gt;, but Wikipedia lists it as &lt;code&gt;application/x-woff&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The net panel in Firebug indicates that the file isn&amp;#8217;t cached; on every page load the font is seemingly requested with a &lt;code&gt;HTTP 200 OK&lt;/code&gt; response. This is not the case however, as I saw when monitoring the access logs of my server.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;So, in conclusion, if you want to cache your woff font: send a Content-Type header, along with a far-future-expire header, and you should be fine.&lt;/p&gt;
&lt;ol&gt;&lt;/ol&gt;</description><link>http://pkruithof.tumblr.com/post/2198464145</link><guid>http://pkruithof.tumblr.com/post/2198464145</guid><pubDate>Mon, 13 Dec 2010 12:47:35 +0100</pubDate><category>webfonts</category><category>firefox</category><category>caching</category><category>woff</category></item><item><title>Why my CouchDB LaunchDaemon didn't work</title><description>&lt;p&gt;Because I ran the couchdb binary as root, that&amp;#8217;s why.&lt;/p&gt;
&lt;p&gt;Apparantly this &amp;#8220;mucks up all the file ownerships so you can&amp;#8217;t run it as the couchdb user again&amp;#8221;. I did this because I needed to (re)start CouchDB manually for whatever reason (not knowing the MacPorts install comes with a daemon might be one of them).&lt;/p&gt;
&lt;p&gt;When my CouchDB was no longer running after booting, I inspected the CouchDB log and saw a huge stack trace, without any helpful error message. The CouchDB wiki &lt;a title="Gentoo failed start up error" href="http://wiki.apache.org/couchdb/Error_messages#Gentoo_failed_start_up_error"&gt;mentions&lt;/a&gt; this stack trace however.&lt;/p&gt;
&lt;p&gt;Their solution is rather dirty: just reinstall CouchDB and never run it as root. If you&amp;#8217;re not comfortable with that - like me - you can also set file permissions to user/group couchdb. These are the files I changed:&lt;/p&gt;
&lt;pre&gt;  /opt/local/etc/couchdb
  /opt/local/etc/default/couchdb
  /opt/local/etc/logrotate.d/couchdb
  /opt/local/bin/couchdb
  /opt/local/bin/couchjs
  /opt/local/lib/couchdb
  /opt/local/share/couchdb
  /opt/local/share/doc/couchdb
  /opt/local/var/lib/couchdb
  /opt/local/var/log/couchdb
  /opt/local/var/run/couchdb
&lt;/pre&gt;</description><link>http://pkruithof.tumblr.com/post/1987206539</link><guid>http://pkruithof.tumblr.com/post/1987206539</guid><pubDate>Tue, 30 Nov 2010 17:38:10 +0100</pubDate><category>note to self</category><category>couchdb</category><category>os x</category></item><item><title>It is ok to set the checked property of a radio button / checkbox</title><description>&lt;p&gt;This is one of those things I keep asking myself when I&amp;#8217;m writing some javascript that checks/unchecks radio buttons and/or checkboxes. The checked property seems like a hack, because the markup for checking an input is &lt;code&gt;checked[="checked"]&lt;/code&gt;. This excellent answer explains the difference. Once again, kudos to StackOverflow.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;value&lt;/code&gt; attribute of &lt;code&gt;input type="text"&lt;/code&gt; and the &lt;code&gt;checked&lt;/code&gt; or &lt;code&gt;selected&lt;/code&gt; attributes of &lt;code&gt;input type="checkbox"&lt;/code&gt;, &lt;code&gt;radio&lt;/code&gt; and &lt;code&gt;option&lt;/code&gt; correspond to the initial value of the form field, &lt;strong&gt;not&lt;/strong&gt; the current value the user or script has set. Consequently changing the &lt;code&gt;checked&lt;/code&gt; property does not alter the attribute value, and setting the &lt;code&gt;checked&lt;/code&gt; attribute does not alter the real visible value that&amp;#8217;s going to be submitted with the form.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;checked="checked"&lt;/code&gt; attribute corresponds to the &lt;code&gt;defaultChecked&lt;/code&gt; &lt;a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-20509171"&gt;DOM property&lt;/a&gt;, not the &lt;code&gt;checked&lt;/code&gt; property. Similarly, the &lt;code&gt;value="..."&lt;/code&gt; attribute corresponds to &lt;code&gt;defaultValue&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;(Note there are IE gotchas here due to IE not knowing the difference between a property and an attribute.)&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://pkruithof.tumblr.com/post/1985019150</link><guid>http://pkruithof.tumblr.com/post/1985019150</guid><pubDate>Tue, 30 Nov 2010 11:03:59 +0100</pubDate><category>note to self</category><category>dom</category><category>checked</category><category>javascript</category></item><item><title>Female nerds</title><description>&lt;img src="http://25.media.tumblr.com/tumblr_l8be31Vk871qd8nm8o1_500.gif"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Female nerds&lt;/p&gt;</description><link>http://pkruithof.tumblr.com/post/1074232901</link><guid>http://pkruithof.tumblr.com/post/1074232901</guid><pubDate>Mon, 06 Sep 2010 09:28:12 +0200</pubDate><category>nerd</category></item></channel></rss>
