<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:posterous="http://posterous.com/help/rss/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>tobym's posterous</title>
    <link>http://tobym.posterous.com</link>
    <description>posts</description>
    <generator>posterous.com</generator>
    <link xmlns="http://www.w3.org/2005/Atom" href="http://posterous.com/api/sup_update#c903b463a" type="application/json" rel="http://api.friendfeed.com/2008/03#sup" />
    
    
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/tobym" /><feedburner:info uri="tobym" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://posterous.superfeedr.com/" /><item>
      <pubDate>Mon, 29 Aug 2011 22:44:00 -0700</pubDate>
      <title>Vim syntax file for dot language</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/cGU1YfMmFKU/vim-syntax-file-for-dot-language</link>
      <guid isPermaLink="false">http://tobym.posterous.com/vim-syntax-file-for-dot-language</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Vim syntax file for graph &lt;a href="http://en.wikipedia.org/wiki/Dot_language"&gt;dot language&lt;/a&gt; is here: &lt;a href="http://www.ocaml.info/vim/syntax/dot.vim"&gt;http://www.ocaml.info/vim/syntax/dot.vim&lt;/a&gt;  (This is more up-to-date than the one at &lt;a href="http://www.opensource.apple.com/source/vim/vim-10/vim/runtime/syntax/dot.vim"&gt;http://www.opensource.apple.com/source/vim/vim-10/vim/runtime/syntax/dot.vim&lt;/a&gt; ).  Add this to your ~/.vim/ftdetect/dot.vim for file type detection:      augroup dot       autocmd BufRead,BufNewFile *.gv set filetype=dot       autocmd BufRead,BufNewFile *.dot set filetype=dot     augroup END&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/vim-syntax-file-for-dot-language"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/vim-syntax-file-for-dot-language#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/cGU1YfMmFKU" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/vim-syntax-file-for-dot-language</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 24 Aug 2011 12:39:13 -0700</pubDate>
      <title>Autocomplete hostnames in bash gotcha</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/zkZIoU5l3k8/autocomplete-hostnames-in-bash-gotcha</link>
      <guid isPermaLink="false">http://tobym.posterous.com/autocomplete-hostnames-in-bash-gotcha</guid>
      <description>&lt;p&gt;
	A while ago I figured out that&amp;nbsp;&lt;a href="http://www.gnu.org/s/bash/"&gt;bash&lt;/a&gt;&amp;nbsp;can autocomplete hostnames that are in the hostfile (/etc/hosts). This works when you hit &amp;lt;Tab&amp;gt; after an @ symbol. For example, if you have something like "127.0.0.1 &lt;a href="http://example.com"&gt;example.com&lt;/a&gt;" in /etc/hosts and in a bash prompt you type "ssh user@ex&amp;lt;Tab&amp;gt;", it will expand to "ssh &lt;a href="mailto:user@example.com"&gt;user@example.com&lt;/a&gt;".&lt;p /&gt;&lt;div&gt;However, it occasionally seemed to fail. I just realized this is because bash will cache the entries in the hostfile, so if you open a terminal and add an entry to /etc/hosts, that session (and any that are already open) will not pick up the change! Any subsequently opened terminals will, of course. You can solve this issue with the stale terminals with "export HOSTFILE=/etc/hosts", which seems to reset the cache and give you the latest autocompletion options.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/autocomplete-hostnames-in-bash-gotcha"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/autocomplete-hostnames-in-bash-gotcha#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/zkZIoU5l3k8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/autocomplete-hostnames-in-bash-gotcha</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 29 Jul 2011 14:56:00 -0700</pubDate>
      <title>K Combinator in Scala</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/4aGmk-nSnvY/k-combinator-in-scala</link>
      <guid isPermaLink="false">http://tobym.posterous.com/k-combinator-in-scala</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;The&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/K_combinator#Combinatory_calculi" target="_blank" style="color: #3d5459;"&gt;K-combinator&lt;/a&gt;&amp;nbsp;"&lt;span style="line-height: 19px;"&gt;manufactures constant functions: (&lt;strong&gt;K&lt;/strong&gt;&amp;nbsp;&lt;em&gt;x&lt;/em&gt;) is the function which, for any argument, returns&amp;nbsp;&lt;em&gt;x&lt;/em&gt;". I wanted to add some logging in the middle of a series of transforms of a Scala collection, and this seemed like the right way to do it. For Rubyists, it works like Object#tap.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p /&gt;
&lt;div style="border-collapse: collapse; color: #333333; font-size: 13px; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;&lt;span style="line-height: 19px;"&gt;&lt;div class="data type-scala"&gt;
    
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;span rel="#L6" id="L6"&gt;6&lt;/span&gt;
&lt;span rel="#L7" id="L7"&gt;7&lt;/span&gt;
&lt;span rel="#L8" id="L8"&gt;8&lt;/span&gt;
&lt;span rel="#L9" id="L9"&gt;9&lt;/span&gt;
&lt;span rel="#L10" id="L10"&gt;10&lt;/span&gt;
&lt;span rel="#L11" id="L11"&gt;11&lt;/span&gt;
&lt;span rel="#L12" id="L12"&gt;12&lt;/span&gt;
&lt;span rel="#L13" id="L13"&gt;13&lt;/span&gt;
&lt;span rel="#L14" id="L14"&gt;14&lt;/span&gt;
&lt;span rel="#L15" id="L15"&gt;15&lt;/span&gt;
&lt;span rel="#L16" id="L16"&gt;16&lt;/span&gt;
&lt;span rel="#L17" id="L17"&gt;17&lt;/span&gt;
&lt;span rel="#L18" id="L18"&gt;18&lt;/span&gt;
&lt;span rel="#L19" id="L19"&gt;19&lt;/span&gt;
&lt;span rel="#L20" id="L20"&gt;20&lt;/span&gt;
&lt;span rel="#L21" id="L21"&gt;21&lt;/span&gt;
&lt;span rel="#L22" id="L22"&gt;22&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
            
              
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="k"&gt;object&lt;/span&gt; &lt;span class="nc"&gt;Functional&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="cm"&gt;/*&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&lt;span class="cm"&gt;   *  Adds the k-combinator to an object. This lets you apply a function to the&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;&lt;span class="cm"&gt;   *  calling object; useful for accessing entire collections in the middle of&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;span class="cm"&gt;   *  a series of transformations. This lets you do horrible, side-effecting&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&lt;span class="cm"&gt;   *  things to mutable collections, so try to avoid that.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;&lt;span class="cm"&gt;   *&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC8"&gt;&lt;span class="cm"&gt;   *  Example:&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC9"&gt;&lt;span class="cm"&gt;   *&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC10"&gt;&lt;span class="cm"&gt;   *    List(1, 2, 3).map(_ * 2).k{ x =&amp;gt; println(x) }.filter(_ &amp;gt; 4)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC11"&gt;&lt;span class="cm"&gt;   *&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC12"&gt;&lt;span class="cm"&gt;   *  Prints &amp;quot;List(2, 4, 6)&amp;quot; and returns List(6)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC13"&gt;&lt;span class="cm"&gt;   */&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC14"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;KCombinator&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="o"&gt;](&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="k"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC15"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="k"&gt;:&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Unit&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="k"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;T&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC16"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC17"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="n"&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC18"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class="o"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC19"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="o"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC20"&gt;&amp;nbsp;&amp;nbsp;&lt;span class="k"&gt;implicit&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="n"&gt;addKCombinator&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="o"&gt;](&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="k"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;KCombinator&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;T&lt;/span&gt;&lt;span class="o"&gt;](&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC21"&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC22"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
              
            
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    
  &lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p /&gt;
&lt;div style="border-collapse: collapse; color: #333333; font-size: 13px; font-family: arial, sans-serif;"&gt;&lt;span style="font-family: arial, helvetica, sans-serif;"&gt;&lt;span style="line-height: 19px;"&gt;This implementation pimps objects to add a "k" method that takes a function. It executes the function, returning the base object. This lets you do convenient things like peer into a chain of transformations. You can use it like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p /&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt; scala&amp;gt; import Functional._ &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt; import Functional._&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt; scala&amp;gt; List(1, 2, 3, 4, 5).k(println).map(_*2).k(println).filter(_&amp;gt;4).k(println)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;List(1, 2, 3, 4, 5)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;List(2, 4, 6, 8, 10)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;List(6, 8, 10)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;res0: List[Int] = List(6, 8, 10)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Throw { x =&amp;gt; logger.log("Something interesting about x"+x.interestingFact) } in there instead of just (println) and you can see an example of more advanced usage.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/k-combinator-in-scala"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/k-combinator-in-scala#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/4aGmk-nSnvY" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/k-combinator-in-scala</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 08 Jul 2011 14:37:00 -0700</pubDate>
      <title>Test Lists In-Order with Scala Specs</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/2lt7zebgUnM/test-lists-in-order-with-scala-specs</link>
      <guid isPermaLink="false">http://tobym.posterous.com/test-lists-in-order-with-scala-specs</guid>
      <description>&lt;p&gt;
	&lt;p&gt;In Scala, you can test that two
&lt;a href="http://www.scala-lang.org/api/current/index.html#scala.collection.immutable.List"&gt;Lists&lt;/a&gt;
are the same with &lt;code&gt;sameElements&lt;/code&gt;:&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;List(1, 2, 3) sameElements List(1, 2, 3) // true
List(1, 2, 3) sameElements List(3, 2, 1) // false
List(1, 2, 3) sameElements List(1, 2, 3, 4) // false&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;So I wrote a test using &lt;a href="http://code.google.com/p/specs/"&gt;Specs&lt;/a&gt; that
was supposed to test that two lists had the same elements in the same
order.&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;import org.specs.Specification
class FooSpec extends Specification {
    &amp;quot;these lists&amp;quot; should {
        &amp;quot;be the same&amp;quot; in {
            List(1, 2, 3) must have sameElementsAs(List(1, 2, 3)) // Pass, as expected.
            List(1, 2, 3) must have sameElementsAs(List(1, 2, 3, 4)) // Fail, as expected.
            List(1, 2, 3) must have sameElementsAs(List(3, 2, 1)) // ---&amp;gt; Pass, unexpected!!! &amp;lt;---
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The trick is to use &lt;code&gt;beTheSameSeqAs&lt;/code&gt;:&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;List(1, 2, 3) must beTheSameSeqAs(List(3, 2, 1)) // Fails, as expected :)&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/test-lists-in-order-with-scala-specs"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/test-lists-in-order-with-scala-specs#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/2lt7zebgUnM" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/test-lists-in-order-with-scala-specs</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 01 Jul 2011 12:33:12 -0700</pubDate>
      <title>Windows 7 Outlook Cannot Open Attachment (Solution)</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/nAoz_z6YFSY/windows-7-outlook-cannot-open-attachment-solu</link>
      <guid isPermaLink="false">http://tobym.posterous.com/windows-7-outlook-cannot-open-attachment-solu</guid>
      <description>&lt;p&gt;
	&lt;p&gt;Windows users, have you seen this error when trying to open a picture
from Outlook?&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;Cannot create file: photo.JPG Right click the folder you want to&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;create the file in and then check properties on the shortcut menu to
check your permissions for this folder.&lt;/p&gt;

&lt;p&gt;The problem is that your &amp;ldquo;temporary internet files&amp;rdquo; folder is filled
to capacity. Right-click on &amp;ldquo;My Computer&amp;rdquo;, click &amp;ldquo;Disk Cleanup&amp;rdquo;, and
make sure the temporary folders are checked. Click Okay and a progress
bar will pop up showing the status of the files being deleted.
Double-click the picture in Outlook again and it will open!&lt;/p&gt;

&lt;p&gt;(This is the significantly easier version of the same solution that
I&amp;rsquo;ve seen on the interwebs, that says to open regedit and find the
OutlookSecureTempFolder and to clear it yourself.)&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/windows-7-outlook-cannot-open-attachment-solu"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/windows-7-outlook-cannot-open-attachment-solu#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/nAoz_z6YFSY" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/windows-7-outlook-cannot-open-attachment-solu</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 29 Jun 2011 11:54:08 -0700</pubDate>
      <title>Selecting and Copying with Mouse in MacVim</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/EohIpCQNvM8/selecting-and-copying-with-mouse-in-macvim</link>
      <guid isPermaLink="false">http://tobym.posterous.com/selecting-and-copying-with-mouse-in-macvim</guid>
      <description>&lt;p&gt;
	&lt;p&gt;In which I finally enable 1996-era functionality.&lt;/p&gt;

&lt;p&gt;This has bothered me for a long time and I just figured it out. I started
using MacVim a while ago but was unable to actually select and copy text
like normal. I have had this mapping for ages:&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;vmap  &amp;quot;*y&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;which allows me to copy visual-mode-selected text to the system clipboard
using Control-c (I haven&amp;rsquo;t been able to map the actually Command key).
MacVim is supposed to give me that ability expect using the mouse and
Command-C like every other Mac application. This never worked for me;
instead it either did nothing (actually made some seemingly random text
disappear because it was really just like hitting &amp;ldquo;c&amp;rdquo; in normal mode). Then
I discovered this setting:&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;set mouse=a&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;That actually enables mouse support in any terminal that supports it, and
MacVim is no exception. Just adding that simple &lt;code&gt;set mouse=a&lt;/code&gt; gives me the
expected mouse copy-paste. Finally I have caught up to 1996!&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/selecting-and-copying-with-mouse-in-macvim"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/selecting-and-copying-with-mouse-in-macvim#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/EohIpCQNvM8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/selecting-and-copying-with-mouse-in-macvim</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 21 Jun 2011 06:35:00 -0700</pubDate>
      <title>MacFUSE and TrueCrypt for Snow Leopard</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/bTuOcLYa53s/macfuse-and-truecrypt-for-snow-leopard</link>
      <guid isPermaLink="false">http://tobym.posterous.com/macfuse-and-truecrypt-for-snow-leopard</guid>
      <description>&lt;p&gt;
	&lt;p&gt;&lt;a href="http://www.truecrypt.org/"&gt;TrueCrypt&lt;/a&gt; requires the MacFUSE filesystem extension. Unfortunately, the latest officially released version (2.0.3) is way out of date. It will install just fine, but after you try to open an encrypted volume in TrueCrypt, it will fail with an error like &lt;code&gt;Failed to load /Library/Filesystems/fusefs.fs/Support/fusefs.kext - (libkern/kext) link error&lt;/code&gt; or &lt;code&gt;Can't load kext com.google.filesystems.fusefs&lt;/code&gt;.&lt;/p&gt;
&lt;div&gt;The fix for me was to install the 64-bit version, 2.1.7 (beta). You can get &lt;a href="http://static.caurea.org/MacFUSE/MacFUSE-2.1.7.dmg"&gt;TrueCrypt 2.1.7 here&lt;/a&gt;. The MD5 hash of that dmg is&amp;nbsp;e01786990111e7065a89cedf0a66ebbb. There appears to be another version out there, 2.1.9, but there are scattered bug reports and 2.1.7 works great for me.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/macfuse-and-truecrypt-for-snow-leopard"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/macfuse-and-truecrypt-for-snow-leopard#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/bTuOcLYa53s" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/macfuse-and-truecrypt-for-snow-leopard</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 13 Apr 2011 09:44:27 -0700</pubDate>
      <title>Neo4j 1.3 community edition released under GPLv3 - same as MySQL</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/33aXnS1Uqh4/neo4j-13-community-edition-released-under-gpl</link>
      <guid isPermaLink="false">http://tobym.posterous.com/neo4j-13-community-edition-released-under-gpl</guid>
      <description>&lt;p&gt;
	The excellent &lt;a href="http://neo4j.org/"&gt;Neo4j graph database&lt;/a&gt; community edition has been &lt;a href="http://blogs.neotechnology.com/emil/2011/04/graph-databases-licensing-and-mysql.html"&gt;released under GPLv3&lt;/a&gt;. This is the same license the MySQL has thrived under for years. The previous license license was too limiting for open-source developers to commit to neo4j. I believe there was a limit to 1 million nodes before one was forced to move to the commercial license. This is enough for small toy projects or to get a feel for the database, but not for a serious application or even a semi-serious nights-and-weekends project, and I think that for all its growth, this was a big barrier to adoption. &lt;a href="http://blog.neo4j.org/2011/04/neo4j-13-abisko-lampa-released.html"&gt;Neo4j 1.3 Abisko Lampa&lt;/a&gt; supports up to 32 billion nodes/relationships and up to 64 billion properties -- all that is now available to any open-source developer. That&amp;#39;s a big step up. I think neo4j&amp;#39;s rate of adoption is going to skyrocket now. 
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/neo4j-13-community-edition-released-under-gpl"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/neo4j-13-community-edition-released-under-gpl#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/33aXnS1Uqh4" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/neo4j-13-community-edition-released-under-gpl</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 08 Apr 2011 11:07:29 -0700</pubDate>
      <title>Google finishes ITA acquisition, turns flight search market into winner-take-all</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/57K2VgfJNu8/google-finishes-ita-acquisition-turns-flight</link>
      <guid isPermaLink="false">http://tobym.posterous.com/google-finishes-ita-acquisition-turns-flight</guid>
      <description>&lt;p&gt;
	&lt;div&gt;Google&amp;#39;s &lt;a href="http://googleblog.blogspot.com/2011/04/ita-software-acquisition-cleared-for.html"&gt;acquisition of ITA Software&lt;/a&gt; was &lt;a href="http://www.justice.gov/opa/pr/2011/April/11-at-445.html"&gt;cleared&lt;/a&gt; by the US Department of Justice. What does this mean for the &lt;a href="http://www.itasoftware.com/about/customers.html"&gt;many websites&lt;/a&gt; that use ITA&amp;#39;s &lt;a href="http://www.itasoftware.com/products/shopping-pricing/qpx.html"&gt;QPX&lt;/a&gt; flight query service? QPX searches a billion combinations of flight fares, schedules, and availability per query; this heavy lifting makes the nice, fast interfaces of &lt;a href="http://www.kayak.com/"&gt;Kayak&lt;/a&gt; and &lt;a href="http://www.hipmunk.com/"&gt;Hipmunk&lt;/a&gt; possible.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;For the near future, nothing will really change since Google is supporting ITA&amp;#39;s existing commitments and allowing customers to extend their licenses through 2016. After 2016, I imagine it will become a winner-take-all market because Google will just buy the best interface and shut off access to everyone else. Starting now, it&amp;#39;s a race to see who can build the best interface to the QPX data. I believe Google would prefer to acquire based on quality of interface, not number of users, as they already have an enormous number of users.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;This changes the rules of the flight deal search game, then. Rather than trying to acquire users to generate revenue, a company might want to focus 100% of its energy on building the flat-out best interface imaginable. Nobody is going to dump a large amount of money to acquire users in a market with a 5-year expiration date. This opens up possibilities for small players to out-innovate the existing websites and win the grand prize, being acquired. Alternatively, this opens up a possibility for someone to build an equivalent to ITA itself (no small task!). The latter option is particularly risky; if Google just continues to license ITA&amp;#39;s software past 2016, then the market basically stays the same and there&amp;#39;s no (less) space for a competitor.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;Bonus question - what does this mean for Bing? Bing is a customer of ITA. Google could just shut them off, which is a big hit to Bing&amp;#39;s goal of being a &amp;quot;decision engine&amp;quot;.&lt;/div&gt;&lt;p /&gt; &lt;div&gt;It will be interesting five years from now to check back on this post and see how right or wrong I was.&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/google-finishes-ita-acquisition-turns-flight"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/google-finishes-ita-acquisition-turns-flight#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/57K2VgfJNu8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/google-finishes-ita-acquisition-turns-flight</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 16 Mar 2011 15:51:00 -0700</pubDate>
      <title>Ten Rules for Entrepreneurs</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/T8RLyFHVjC4/ten-rules-for-entrepreneurs</link>
      <guid isPermaLink="false">http://tobym.posterous.com/ten-rules-for-entrepreneurs</guid>
      <description>&lt;p&gt;
	&lt;div class="posterous_bookmarklet_entry"&gt;
      &lt;blockquote class="posterous_long_quote"&gt;&lt;p&gt;&lt;strong&gt;Reid Hoffman's Ten Rules for Entrepreneurs&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Seek To Create Disruptive Change. Is this massive and different? Example: Skype&lt;/li&gt;&lt;li&gt;Aim Big. It's the same amount of blood, sweat and tears to build a small company to flip as a big one to change the world.&lt;/li&gt;&lt;li&gt;Build A Network to Amplify Your Company.  Your network is a store of distributed intelligence that can enable you. It's important at the board and investor level and the rank and file.&lt;/li&gt;&lt;li&gt;Plan for Both Good and Bad Luck.  Opportunity will cross your path and you'll have to pivot to reach it. Plan Bs are intuitively easier to plan for.&lt;/li&gt;&lt;li&gt;Maintain Flexible Persistence.  Know when to be persistent, when to be flexible and when to be a combination of both.&lt;/li&gt;&lt;li&gt;Launch Early Enough To Be Embarrassed By Your Creation.  You'll probably be wrong about most of of your thesis, and you might as well get the feedback. Perfection is a myth. Get it into the mix. Don't undervalue the importance of time.&lt;/li&gt;&lt;li&gt;Aim High But Don't Drink Your Own Kool-Aid. Find friends who will tell you when your baby is ugly.&lt;/li&gt;&lt;li&gt;A Great Idea for a Product is Important. But a great idea for product distribution is more important.&lt;/li&gt;&lt;li&gt;Pay Attention to Your Culture.  Worry about getting hiring right from the very beginning.&lt;/li&gt;&lt;li&gt;These Rules are Not Laws of Nature. You can break them.&lt;/li&gt;&lt;/ol&gt;&lt;/blockquote&gt;

&lt;div class="posterous_quote_citation"&gt;via &lt;a href="http://www.fastcompany.com/1739108/reid-hoffman-data-wrangler-of-the-modern-age"&gt;fastcompany.com&lt;/a&gt;&lt;/div&gt;
    &lt;p&gt;&lt;/p&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/ten-rules-for-entrepreneurs"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/ten-rules-for-entrepreneurs#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/T8RLyFHVjC4" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/ten-rules-for-entrepreneurs</feedburner:origLink></item>
    <item>
      <pubDate>Tue, 15 Feb 2011 10:27:00 -0800</pubDate>
      <title>Mac OS X Install rmagick gem and imagemagick</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/q9yJsJhGaaI/mac-os-x-install-rmagick-gem-and-imagemagick</link>
      <guid isPermaLink="false">http://tobym.posterous.com/mac-os-x-install-rmagick-gem-and-imagemagick</guid>
      <description>&lt;p&gt;
	&lt;div class="data type-shell"&gt;
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;span rel="#L6" id="L6"&gt;6&lt;/span&gt;
&lt;span rel="#L7" id="L7"&gt;7&lt;/span&gt;
&lt;span rel="#L8" id="L8"&gt;8&lt;/span&gt;
&lt;span rel="#L9" id="L9"&gt;9&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="c"&gt;# How to install rmagick gem on Mac OS X. Tested on 10.6.6, assumes you have&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&lt;span class="c"&gt;# macports installed. Basically http://rmagick.rubyforge.org/install-osx.html,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&lt;span class="c"&gt;# but that didn&amp;#39;t work for me as-is. Used ruby-1.9.1p378 installed with RVM.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;sudo port install tiff -macosx&lt;/div&gt;&lt;div class="line" id="LC6"&gt;sudo port clean ImageMagick &lt;span class="c"&gt;# (because I started installing it, then stopped)&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;sudo port install imagemagick  +gs +wmf&lt;/div&gt;&lt;div class="line" id="LC8"&gt;gem install rmagick&lt;/div&gt;&lt;div class="line" id="LC9"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/mac-os-x-install-rmagick-gem-and-imagemagick"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/mac-os-x-install-rmagick-gem-and-imagemagick#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/q9yJsJhGaaI" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/mac-os-x-install-rmagick-gem-and-imagemagick</feedburner:origLink></item>
    <item>
      <pubDate>Sat, 05 Feb 2011 12:34:00 -0800</pubDate>
      <title>ElasticSearch "term" filter/query gotcha</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/dH8bgaqElFY/elasticsearch-term-filterquery-gotcha</link>
      <guid isPermaLink="false">http://tobym.posterous.com/elasticsearch-term-filterquery-gotcha</guid>
      <description>&lt;p&gt;
	&lt;div&gt;"term" filters and queries are not analyzed. I misinterpreted the &lt;a href="https://github.com/elasticsearch/elasticsearch/wiki/Term-Filter"&gt;docs&lt;/a&gt;&amp;nbsp;to mean that the document's field was not analyzed; actually it means the term passed in the filter is not analyzed. This could trip you up if you have a case-sensitive value.&lt;/div&gt;
&lt;p&gt;If you index the document &lt;code&gt;{ "foo" : "bAr" }&lt;/code&gt;, a "term" filter like &lt;code&gt;{ "term" : { "foo" : "bAr" } }&lt;/code&gt; &lt;em&gt;will not&lt;/em&gt; return that document, which might surprise you since "foo" is "bAr" in the document and the query. The reason is that the term "bAr" is not analyzed, but the field "bAr" &lt;em&gt;was&lt;/em&gt;. So you have two choices now: first, analyze the term yourself and pass a filter like &lt;code&gt;{ "term" : { "foo" : "bar" } }&lt;/code&gt; &amp;nbsp;(note the lower-case); second use a query filter like &lt;code&gt;{ "query" : { "query_string" : { "query" : "foo:bAr" } } }&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;EDIT: prefix filter is also not analyzed.&lt;/p&gt;
&lt;p&gt;EDIT 2: @kimchy updated the docs to clarify that prefix filter and prefix query are not analyzed:&amp;nbsp;&lt;a href="http://www.elasticsearch.org/guide/reference/query-dsl/prefix-filter.html"&gt;http://www.elasticsearch.org/guide/reference/query-dsl/prefix-filter.html&lt;/a&gt;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/elasticsearch-term-filterquery-gotcha"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/elasticsearch-term-filterquery-gotcha#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/dH8bgaqElFY" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/elasticsearch-term-filterquery-gotcha</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 04 Feb 2011 12:23:22 -0800</pubDate>
      <title>ElasticSearch examples</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/KAw229ioasM/elasticsearch-examples</link>
      <guid isPermaLink="false">http://tobym.posterous.com/elasticsearch-examples</guid>
      <description>&lt;p&gt;
	I wrote some ElasticSearch examples to show how to query for associated documents:&lt;br /&gt; &lt;div&gt;&lt;div class="data type-shell"&gt;
    
      &lt;table class="lines" cellspacing="0" cellpadding="0"&gt;
        &lt;tr&gt;
          &lt;td&gt;
            &lt;pre class="line_numbers"&gt;&lt;span rel="#L1" id="L1"&gt;1&lt;/span&gt;
&lt;span rel="#L2" id="L2"&gt;2&lt;/span&gt;
&lt;span rel="#L3" id="L3"&gt;3&lt;/span&gt;
&lt;span rel="#L4" id="L4"&gt;4&lt;/span&gt;
&lt;span rel="#L5" id="L5"&gt;5&lt;/span&gt;
&lt;span rel="#L6" id="L6"&gt;6&lt;/span&gt;
&lt;span rel="#L7" id="L7"&gt;7&lt;/span&gt;
&lt;span rel="#L8" id="L8"&gt;8&lt;/span&gt;
&lt;span rel="#L9" id="L9"&gt;9&lt;/span&gt;
&lt;span rel="#L10" id="L10"&gt;10&lt;/span&gt;
&lt;span rel="#L11" id="L11"&gt;11&lt;/span&gt;
&lt;span rel="#L12" id="L12"&gt;12&lt;/span&gt;
&lt;span rel="#L13" id="L13"&gt;13&lt;/span&gt;
&lt;span rel="#L14" id="L14"&gt;14&lt;/span&gt;
&lt;span rel="#L15" id="L15"&gt;15&lt;/span&gt;
&lt;span rel="#L16" id="L16"&gt;16&lt;/span&gt;
&lt;span rel="#L17" id="L17"&gt;17&lt;/span&gt;
&lt;span rel="#L18" id="L18"&gt;18&lt;/span&gt;
&lt;span rel="#L19" id="L19"&gt;19&lt;/span&gt;
&lt;span rel="#L20" id="L20"&gt;20&lt;/span&gt;
&lt;span rel="#L21" id="L21"&gt;21&lt;/span&gt;
&lt;span rel="#L22" id="L22"&gt;22&lt;/span&gt;
&lt;span rel="#L23" id="L23"&gt;23&lt;/span&gt;
&lt;span rel="#L24" id="L24"&gt;24&lt;/span&gt;
&lt;span rel="#L25" id="L25"&gt;25&lt;/span&gt;
&lt;span rel="#L26" id="L26"&gt;26&lt;/span&gt;
&lt;span rel="#L27" id="L27"&gt;27&lt;/span&gt;
&lt;span rel="#L28" id="L28"&gt;28&lt;/span&gt;
&lt;span rel="#L29" id="L29"&gt;29&lt;/span&gt;
&lt;span rel="#L30" id="L30"&gt;30&lt;/span&gt;
&lt;span rel="#L31" id="L31"&gt;31&lt;/span&gt;
&lt;span rel="#L32" id="L32"&gt;32&lt;/span&gt;
&lt;span rel="#L33" id="L33"&gt;33&lt;/span&gt;
&lt;span rel="#L34" id="L34"&gt;34&lt;/span&gt;
&lt;span rel="#L35" id="L35"&gt;35&lt;/span&gt;
&lt;span rel="#L36" id="L36"&gt;36&lt;/span&gt;
&lt;span rel="#L37" id="L37"&gt;37&lt;/span&gt;
&lt;span rel="#L38" id="L38"&gt;38&lt;/span&gt;
&lt;span rel="#L39" id="L39"&gt;39&lt;/span&gt;
&lt;span rel="#L40" id="L40"&gt;40&lt;/span&gt;
&lt;span rel="#L41" id="L41"&gt;41&lt;/span&gt;
&lt;span rel="#L42" id="L42"&gt;42&lt;/span&gt;
&lt;span rel="#L43" id="L43"&gt;43&lt;/span&gt;
&lt;span rel="#L44" id="L44"&gt;44&lt;/span&gt;
&lt;span rel="#L45" id="L45"&gt;45&lt;/span&gt;
&lt;span rel="#L46" id="L46"&gt;46&lt;/span&gt;
&lt;span rel="#L47" id="L47"&gt;47&lt;/span&gt;
&lt;span rel="#L48" id="L48"&gt;48&lt;/span&gt;
&lt;span rel="#L49" id="L49"&gt;49&lt;/span&gt;
&lt;span rel="#L50" id="L50"&gt;50&lt;/span&gt;
&lt;span rel="#L51" id="L51"&gt;51&lt;/span&gt;
&lt;span rel="#L52" id="L52"&gt;52&lt;/span&gt;
&lt;span rel="#L53" id="L53"&gt;53&lt;/span&gt;
&lt;span rel="#L54" id="L54"&gt;54&lt;/span&gt;
&lt;span rel="#L55" id="L55"&gt;55&lt;/span&gt;
&lt;span rel="#L56" id="L56"&gt;56&lt;/span&gt;
&lt;span rel="#L57" id="L57"&gt;57&lt;/span&gt;
&lt;span rel="#L58" id="L58"&gt;58&lt;/span&gt;
&lt;span rel="#L59" id="L59"&gt;59&lt;/span&gt;
&lt;span rel="#L60" id="L60"&gt;60&lt;/span&gt;
&lt;span rel="#L61" id="L61"&gt;61&lt;/span&gt;
&lt;span rel="#L62" id="L62"&gt;62&lt;/span&gt;
&lt;span rel="#L63" id="L63"&gt;63&lt;/span&gt;
&lt;span rel="#L64" id="L64"&gt;64&lt;/span&gt;
&lt;span rel="#L65" id="L65"&gt;65&lt;/span&gt;
&lt;span rel="#L66" id="L66"&gt;66&lt;/span&gt;
&lt;span rel="#L67" id="L67"&gt;67&lt;/span&gt;
&lt;span rel="#L68" id="L68"&gt;68&lt;/span&gt;
&lt;span rel="#L69" id="L69"&gt;69&lt;/span&gt;
&lt;span rel="#L70" id="L70"&gt;70&lt;/span&gt;
&lt;/pre&gt;
          &lt;/td&gt;
          &lt;td width="100%"&gt;
            
              
                &lt;div class="highlight"&gt;&lt;pre /&gt;&lt;div class="line" id="LC1"&gt;&lt;span class="c"&gt;# Example of association mapping in ElasticSearch. Assumes ES is running on localhost:9200 (the default).&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC2"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC3"&gt;&lt;span class="c"&gt;# Clear index.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC4"&gt;curl -XDELETE &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC5"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC6"&gt;&lt;span class="c"&gt;# Store &amp;#39;B&amp;#39; objects.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC7"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/B/1&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC8"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;Lorem ipsum dolor sit amet, consectetuer adipiscing elit&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC9"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC10"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/B/2&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC11"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;Vivamus vitae risus vitae lorem iaculis placerat&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC12"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC13"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/B/3&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC14"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;Aliquam sit amet felis&amp;quot;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC15"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC16"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC17"&gt;&lt;span class="c"&gt;# Store &amp;#39;A&amp;#39; objects..&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC18"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/1&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC19"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;something unique to A 1&amp;quot;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC20"&gt;&lt;span class="s1"&gt;  &amp;quot;B&amp;quot; : [1, 2, 3]&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC21"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC22"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/2&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC23"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;something interesting about to A 2&amp;quot;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC24"&gt;&lt;span class="s1"&gt;  &amp;quot;B&amp;quot; : [1]&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC25"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC26"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC27"&gt;&lt;span class="c"&gt;# Ensure changes are available.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC28"&gt;curl -XPOST &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/_refresh&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC29"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC30"&gt;&lt;span class="c"&gt;# Find all As that are associated to a given B (#2). Returns A1.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC31"&gt;curl -XGET &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/_search?pretty=true&amp;amp;q=B:2&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC32"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC33"&gt;&lt;span class="c"&gt;# Find all As that are associated to a given B (#2). Returns A1 and A2.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC34"&gt;curl -XGET &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/_search?pretty=true&amp;amp;q=B:1&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC35"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC36"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC37"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC38"&gt;&lt;span class="c"&gt;# Find all As that are associated to Bs that match a given query. Embedded&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC39"&gt;&lt;span class="c"&gt;# object method.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC40"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC41"&gt;&lt;span class="c"&gt;# Store &amp;#39;A&amp;#39; objects with embedded B objects. (To conserve space, update mapping&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC42"&gt;&lt;span class="c"&gt;# so embedded object is not stored). Also just index fields of B that you will&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC43"&gt;&lt;span class="c"&gt;# search on.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC44"&gt;&lt;span class="c"&gt;# Note the embedded objects are stored under a different key (&amp;#39;Bobj&amp;#39; instead of&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC45"&gt;&lt;span class="c"&gt;# &amp;#39;B&amp;#39;) because the indexing above already created a dynamic type mapping for B&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC46"&gt;&lt;span class="c"&gt;# to be an integer, but now we&amp;#39;re indexing B as an object.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC47"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/3&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC48"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;this is essentially A 1&amp;quot;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC49"&gt;&lt;span class="s1"&gt;  &amp;quot;Bobj&amp;quot; : [&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC50"&gt;&lt;span class="s1"&gt;    { &amp;quot;content&amp;quot; : &amp;quot;Lorem ipsum dolor sit amet, consectetuer adipiscing elit&amp;quot; },&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC51"&gt;&lt;span class="s1"&gt;    { &amp;quot;content&amp;quot; : &amp;quot;Vivamus vitae risus vitae lorem iaculis placerat&amp;quot; },&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC52"&gt;&lt;span class="s1"&gt;    { &amp;quot;content&amp;quot; : &amp;quot;Aliquam sit amet felis&amp;quot; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC53"&gt;&lt;span class="s1"&gt;  ]&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC54"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC55"&gt;curl -XPUT &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/4&amp;#39;&lt;/span&gt; -d &lt;span class="s1"&gt;&amp;#39;{&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC56"&gt;&lt;span class="s1"&gt;  &amp;quot;content&amp;quot; : &amp;quot;and this is bascially A 2&amp;quot;,&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC57"&gt;&lt;span class="s1"&gt;  &amp;quot;Bobj&amp;quot; : [&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC58"&gt;&lt;span class="s1"&gt;    { &amp;quot;content&amp;quot; : &amp;quot;Lorem ipsum dolor sit amet, consectetuer adipiscing elit&amp;quot; }&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC59"&gt;&lt;span class="s1"&gt;  ]&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC60"&gt;&lt;span class="s1"&gt;}&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC61"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC62"&gt;&lt;span class="c"&gt;# Ensure changes are available.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC63"&gt;curl -XPOST &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/_refresh&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC64"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC65"&gt;&lt;span class="c"&gt;# Find all As that are associated to a matching Bs (#2). Returns A3.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC66"&gt;curl -XGET &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/_search?pretty=true&amp;amp;q=Bobj.content:vitae&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC67"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="line" id="LC68"&gt;&lt;span class="c"&gt;# Find all As that are associated to a matching Bs (#1 and #2). Returns A4.&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC69"&gt;curl -XGET &lt;span class="s1"&gt;&amp;#39;localhost:9200/testassoc/A/_search?pretty=true&amp;amp;q=Bobj.content:lorem&amp;#39;&lt;/span&gt;&lt;/div&gt;&lt;div class="line" id="LC70"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
              
            
          &lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    
  &lt;/div&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/elasticsearch-examples"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/elasticsearch-examples#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/KAw229ioasM" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/elasticsearch-examples</feedburner:origLink></item>
    <item>
      <pubDate>Wed, 26 Jan 2011 15:24:00 -0800</pubDate>
      <title>FB on the Importance of Tools</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/3yry9TKII3M/fb-on-the-importance-of-tools</link>
      <guid isPermaLink="false">http://tobym.posterous.com/fb-on-the-importance-of-tools</guid>
      <description>&lt;p&gt;
	&lt;div class="posterous_bookmarklet_entry"&gt;
      &lt;blockquote class="posterous_short_quote"&gt;The original "second DBA" was even only hired because eventually our first database engineer decided she wanted someone else to cover the night shift.&lt;/blockquote&gt;

&lt;div class="posterous_quote_citation"&gt;via &lt;a href="http://algeri-wong.com/yishan/engineering-management-tools-are-top-priority.html"&gt;algeri-wong.com&lt;/a&gt;&lt;/div&gt;
    &lt;p&gt;Good tools multiply the effectiveness of individuals by staggering amounts.&lt;/p&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/fb-on-the-importance-of-tools"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/fb-on-the-importance-of-tools#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/3yry9TKII3M" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/fb-on-the-importance-of-tools</feedburner:origLink></item>
    <item>
      <pubDate>Mon, 24 Jan 2011 07:49:57 -0800</pubDate>
      <title>mysqlimport can't get stat of file</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/ahk4ILARz-E/mysqlimport-cant-get-stat-of-file</link>
      <guid isPermaLink="false">http://tobym.posterous.com/mysqlimport-cant-get-stat-of-file</guid>
      <description>&lt;p&gt;
	&lt;div&gt;I tried to import some data from a CSV file into MySQL using mysqlimport. It complained a lot even though I passed the absolute path and the permissions were okay:&lt;/div&gt;&lt;br /&gt; &lt;div&gt;$ mysqlimport -p &amp;lt;my_db&amp;gt; --ignore-lines=1 /absolute/path/to/data.csv&lt;/div&gt;&lt;div&gt;mysqlimport: Error: 13, Can&amp;#39;t get stat of &amp;#39;/absolute/path/to/data.csv&amp;#39; (Errcode: 13), when using table: data&lt;/div&gt; &lt;p /&gt;&lt;p /&gt;&lt;div&gt;The solution was to add the -L flag (short form of the --local flag). This means to read the file locally from the client host. I wondered how mysqlimport could even work without this flag; turns out the user must have the &lt;a href="http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html#priv_file"&gt;FILE privilege&lt;/a&gt;. Now I still wonder how mysqlimport can work without that flag because my user had that privilege but it failed nevertheless. Also, MySQL server, client, and the data file were on the same machine.&lt;/div&gt; &lt;p /&gt;&lt;div&gt;The version that worked is:&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier new, monospace;"&gt;$ mysqlimport -p &amp;lt;my_db&amp;gt; --ignore-lines=1 -L /absolute/path/to/data.csv&lt;/span&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/mysqlimport-cant-get-stat-of-file"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/mysqlimport-cant-get-stat-of-file#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/ahk4ILARz-E" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/mysqlimport-cant-get-stat-of-file</feedburner:origLink></item>
    <item>
      <pubDate>Sun, 09 Jan 2011 21:01:00 -0800</pubDate>
      <title>Install Ruby on CentOS with RVM</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/8fMSvjxS6_c/install-ruby-on-centos-with-rvm</link>
      <guid isPermaLink="false">http://tobym.posterous.com/install-ruby-on-centos-with-rvm</guid>
      <description>&lt;p&gt;
	&lt;p&gt;If you see this error: &amp;ldquo;no such file to load &amp;mdash; zlib&amp;rdquo;, but you have
zlib and zlib-devel installed already, it&amp;rsquo;s because you must pass the
paths explicitly.&lt;/p&gt;

&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;rvm install 1.9.2 --with-zlib-include=/usr/include/ --with-zlib-lib=/usr/lib/&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;To get the required development tools like &lt;code&gt;make&lt;/code&gt;, use &lt;code&gt;yum
groupinstall 'Development Tools'&lt;/code&gt; which is similar to &lt;code&gt;apt-get install
build-essential&lt;/code&gt; on Debian.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/install-ruby-on-centos-with-rvm"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/install-ruby-on-centos-with-rvm#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/8fMSvjxS6_c" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/install-ruby-on-centos-with-rvm</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 30 Dec 2010 23:35:00 -0800</pubDate>
      <title>Hack + Math + Expert = Data Scientist</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/S4ikHv4qWng/hack-math-expert-data-scientist</link>
      <guid isPermaLink="false">http://tobym.posterous.com/hack-math-expert-data-scientist</guid>
      <description>&lt;p&gt;
	&lt;div class="posterous_bookmarklet_entry"&gt;
      &lt;div class='p_embed p_image_embed'&gt;
&lt;a href="http://getfile5.posterous.com/getfile/files.posterous.com/tobym/xtAcxCvbEommolCtnvaedfvxEDivmiEfjdksAAEcmFwaDdwxJCymgrdnjrBj/media_httpwwwdrewconw_EfjIE.png.scaled1000.png"&gt;&lt;img alt="Media_httpwwwdrewconw_efjie" height="477" src="http://getfile1.posterous.com/getfile/files.posterous.com/tobym/xtAcxCvbEommolCtnvaedfvxEDivmiEfjdksAAEcmFwaDdwxJCymgrdnjrBj/media_httpwwwdrewconw_EfjIE.png.scaled500.png" width="500" /&gt;&lt;/a&gt;
&lt;/div&gt;


&lt;div class="posterous_quote_citation"&gt;via &lt;a href="http://www.drewconway.com/zia/wp-content/uploads/2010/09/Data_Science_VD.png"&gt;drewconway.com&lt;/a&gt;&lt;/div&gt;
    &lt;p&gt;Venn diagrams are fun&lt;/p&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/hack-math-expert-data-scientist"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/hack-math-expert-data-scientist#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/S4ikHv4qWng" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
      <media:content type="image/png" height="504" width="528" url="http://getfile7.posterous.com/getfile/files.posterous.com/tobym/xtAcxCvbEommolCtnvaedfvxEDivmiEfjdksAAEcmFwaDdwxJCymgrdnjrBj/media_httpwwwdrewconw_EfjIE.png">
        <media:thumbnail height="477" width="500" url="http://getfile1.posterous.com/getfile/files.posterous.com/tobym/xtAcxCvbEommolCtnvaedfvxEDivmiEfjdksAAEcmFwaDdwxJCymgrdnjrBj/media_httpwwwdrewconw_EfjIE.png.scaled500.png" />
      </media:content>
    <feedburner:origLink>http://tobym.posterous.com/hack-math-expert-data-scientist</feedburner:origLink></item>
    <item>
      <pubDate>Fri, 24 Dec 2010 13:11:00 -0800</pubDate>
      <title>Data mining: Classification vs Clustering</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/2Cf-uz1IGP8/data-mining-classification-vs-clustering</link>
      <guid isPermaLink="false">http://tobym.posterous.com/data-mining-classification-vs-clustering</guid>
      <description>&lt;p&gt;
	&lt;div class="posterous_bookmarklet_entry"&gt;
      &lt;blockquote class="posterous_long_quote"&gt;&lt;p&gt;&lt;a name="Classification"&gt;&lt;span class="smalltitle"&gt;Classification&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
            
            &lt;p&gt;Question: "How likely is person X to buy the newest BMW M5?" By creating a
                classification tree (a decision tree), the data can be mined to
                determine the likelihood of this person to buy a new M5. Possible nodes on
                the tree would be age, income level, current number of cars, mariatl
                status, kids, homeowner, or renter. The attributes of this person can be
                used against the decision tree to determine the likelihood of him
                purchasing the M5. &lt;/p&gt;
            
            &lt;p&gt;&lt;a name="Clustering"&gt;&lt;span class="smalltitle"&gt;Clustering&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
           
            &lt;p&gt;Question: "What age groups like the silver BMW M5?" The data can be mined
                to compare the age of the purchaser of past cars and the colors 
                bought in the past. From this data, it could be found whether certain age
                groups (22-30 year olds, for example) have a higher propensity to order a
                certain color of BMW M5s (75 percent buy blue). Similarly, it can be shown that
                a different age group (55-62, for example) tend to order silver BMWs (65
                percent buy silver, 20 percent buy gray). The data, when mined, will tend to cluster
                around certain age groups and certain colors, allowing the user to quickly
                determine patterns in the data. &lt;/p&gt;&lt;/blockquote&gt;

&lt;div class="posterous_quote_citation"&gt;via &lt;a href="http://www.ibm.com/developerworks/opensource/library/os-weka2/index.html"&gt;ibm.com&lt;/a&gt;&lt;/div&gt;
    &lt;p&gt;&lt;/p&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/data-mining-classification-vs-clustering"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/data-mining-classification-vs-clustering#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/2Cf-uz1IGP8" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
    <feedburner:origLink>http://tobym.posterous.com/data-mining-classification-vs-clustering</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 23 Dec 2010 19:54:53 -0800</pubDate>
      <title>Binary switch on electric heater</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/QaNtMr39wLk/binary-switch-on-electric-heater</link>
      <guid isPermaLink="false">http://tobym.posterous.com/binary-switch-on-electric-heater</guid>
      <description>&lt;p&gt;
	&lt;div class='p_embed p_image_embed'&gt;
&lt;a href="http://posterous.com/getfile/files.posterous.com/tobym/ve25vR6GlNqs8T9bEs99IOWJaSY6p9GUMa4HMSC8YG8UgB8DB7EQkkEb0aoe/photo.jpg.scaled.1000.jpg"&gt;&lt;img alt="Photo" height="667" src="http://posterous.com/getfile/files.posterous.com/tobym/6uB6Hn4otNOHMyVXaGz2RXkKudBM6qgeY6RcMYTc5GnpaDsIFxAlbOsTOPLD/photo.jpg.scaled.500.jpg" width="500" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;This electric heater has actual binary switches for control. 00 for off, 01 for low, 10 for medium, and 11 for high.&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/binary-switch-on-electric-heater"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/binary-switch-on-electric-heater#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/QaNtMr39wLk" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
      <media:content type="image/jpeg" height="1536" width="2048" url="http://getfile4.posterous.com/getfile/files.posterous.com/tobym/izHPFATSgpdz7mm940asfjcZWdo7OyPzXof6nxFhoPYqMQ3IhZ42I2W8VnAT/photo.jpg">
        <media:thumbnail height="667" width="500" url="http://getfile5.posterous.com/getfile/files.posterous.com/tobym/6uB6Hn4otNOHMyVXaGz2RXkKudBM6qgeY6RcMYTc5GnpaDsIFxAlbOsTOPLD/photo.jpg.scaled.500.jpg" />
      </media:content>
    <feedburner:origLink>http://tobym.posterous.com/binary-switch-on-electric-heater</feedburner:origLink></item>
    <item>
      <pubDate>Thu, 23 Dec 2010 19:50:54 -0800</pubDate>
      <title>Facebook credits available for purchase at Target</title>
      <link>http://feedproxy.google.com/~r/tobym/~3/GvmG71s-kLo/facebook-credits-available-for-purchase-at-ta</link>
      <guid isPermaLink="false">http://tobym.posterous.com/facebook-credits-available-for-purchase-at-ta</guid>
      <description>&lt;p&gt;
	&lt;div class='p_embed p_image_embed'&gt;
&lt;a href="http://getfile6.posterous.com/getfile/files.posterous.com/tobym/WkKfJHgALxinO0JlutbQXfw1QavN36now8JYHwhysBUkUyTs3yj0PwcSlqCB/photo.jpg.scaled.1000.jpg"&gt;&lt;img alt="Photo" height="667" src="http://getfile5.posterous.com/getfile/files.posterous.com/tobym/7U8w3SG4wWUMGe7TYeISyzXMLSZ0GJtFDDxlfgMNDulKaGEQCdz5CClynVp8/photo.jpg.scaled.500.jpg" width="500" /&gt;&lt;/a&gt;
&lt;/div&gt;

	
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://tobym.posterous.com/facebook-credits-available-for-purchase-at-ta"&gt;Permalink&lt;/a&gt; 

	| &lt;a href="http://tobym.posterous.com/facebook-credits-available-for-purchase-at-ta#comment"&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/tobym/~4/GvmG71s-kLo" height="1" width="1"/&gt;</description>
      <posterous:author>
        <posterous:userImage>http://files.posterous.com/user_profile_pics/408064/Toby_profile.jpg</posterous:userImage>
        <posterous:profileUrl>http://posterous.com/users/faIDGqdmO</posterous:profileUrl>
        <posterous:firstName />
        <posterous:lastName />
        <posterous:nickName>tobym</posterous:nickName>
        <posterous:displayName>tobym</posterous:displayName>
      </posterous:author>
      <media:content type="image/jpeg" height="1536" width="2048" url="http://getfile4.posterous.com/getfile/files.posterous.com/tobym/8h8RAbcs2yMD6oFK2UkOG5FDdNkcDfKCnczK7nyatsuFZ78WMZB9MBuWxlJH/photo.jpg">
        <media:thumbnail height="667" width="500" url="http://getfile5.posterous.com/getfile/files.posterous.com/tobym/7U8w3SG4wWUMGe7TYeISyzXMLSZ0GJtFDDxlfgMNDulKaGEQCdz5CClynVp8/photo.jpg.scaled.500.jpg" />
      </media:content>
    <feedburner:origLink>http://tobym.posterous.com/facebook-credits-available-for-purchase-at-ta</feedburner:origLink></item>
  </channel>
</rss>

