<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>The erudition of Inventive Labs, collected.</description><title>Wisdom</title><generator>Tumblr (3.0; @inventive)</generator><link>http://wisdom.inventivelabs.com.au/</link><item><title>Logging the domain with Apache wildcard virtual hosts</title><description>&lt;p&gt;If you have an Apache virtual host set up to respond to a number of different domains, the two typical access log configurations (&lt;a href="http://httpd.apache.org/docs/2.0/logs.html#accesslog"&gt;&lt;i&gt;common&lt;/i&gt; and &lt;i&gt;combined&lt;/i&gt;&lt;/a&gt;) do not include domain information. So you can see what resource is being accessed, but not for which domain. This becomes significant if you are serving different content based on the domain, as we do with Blueprint.&lt;/p&gt;

&lt;p&gt;We use the NCSA combined log format. Adding the domain information to this format is as simple as plucking it from the request headers: &lt;code&gt;"{Host:}i"&lt;/code&gt;. To retain compatibility with the standard ‘combined’ format, we replace the superfluous “user” item in the format with the domain, like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;CustomLog access_log "%h %l \"%{Host}i\" %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-agent}i\""&lt;/code&gt;&lt;/pre&gt;</description><link>http://wisdom.inventivelabs.com.au/post/92394456</link><guid>http://wisdom.inventivelabs.com.au/post/92394456</guid><pubDate>Thu, 02 Apr 2009 19:13:41 -0400</pubDate></item><item><title>Prototype.js Function#wrap</title><description>&lt;a href="http://www.prototypejs.org/api/function/wrap"&gt;Prototype.js Function#wrap&lt;/a&gt;: &lt;p&gt;A little gem I only found just now in the prototype.js library.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/80938404</link><guid>http://wisdom.inventivelabs.com.au/post/80938404</guid><pubDate>Mon, 23 Feb 2009 21:15:00 -0500</pubDate></item><item><title>htop - an advanced command-line process monitor</title><description>&lt;a href="http://htop.sourceforge.net/"&gt;htop - an advanced command-line process monitor&lt;/a&gt;</description><link>http://wisdom.inventivelabs.com.au/post/80937945</link><guid>http://wisdom.inventivelabs.com.au/post/80937945</guid><pubDate>Mon, 23 Feb 2009 21:13:44 -0500</pubDate></item><item><title>"" Show spaces at the end of lines
hi RedundantSpaces ctermbg=DarkGrey guibg=#222222
match..."</title><description>“&lt;pre&gt;&lt;code&gt;" Show spaces at the end of lines
hi RedundantSpaces ctermbg=DarkGrey guibg=#222222
match RedundantSpaces /\s\+$/
&lt;/code&gt;&lt;/pre&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Pop it in your &lt;code&gt;.vimrc&lt;/code&gt;.&lt;/em&gt;</description><link>http://wisdom.inventivelabs.com.au/post/80937742</link><guid>http://wisdom.inventivelabs.com.au/post/80937742</guid><pubDate>Mon, 23 Feb 2009 21:12:54 -0500</pubDate></item><item><title>"dpkg-reconfigure tzdata"</title><description>“dpkg-reconfigure tzdata”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Change the timezone in Ubuntu.&lt;/em&gt;</description><link>http://wisdom.inventivelabs.com.au/post/51669680</link><guid>http://wisdom.inventivelabs.com.au/post/51669680</guid><pubDate>Thu, 25 Sep 2008 03:22:14 -0400</pubDate></item><item><title>New in Rails 2.1.0</title><description>&lt;a href="http://weblog.rubyonrails.com/2008/6/1/rails-2-1-time-zones-dirty-caching-gem-dependencies-caching-etc"&gt;New in Rails 2.1.0&lt;/a&gt;</description><link>http://wisdom.inventivelabs.com.au/post/36830525</link><guid>http://wisdom.inventivelabs.com.au/post/36830525</guid><pubDate>Sun, 01 Jun 2008 21:12:29 -0400</pubDate></item><item><title>New in Ruby 1.8.7</title><description>&lt;a href="http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7/NEWS"&gt;New in Ruby 1.8.7&lt;/a&gt;</description><link>http://wisdom.inventivelabs.com.au/post/36765521</link><guid>http://wisdom.inventivelabs.com.au/post/36765521</guid><pubDate>Sun, 01 Jun 2008 06:10:32 -0400</pubDate></item><item><title>Mr and Mrs Systems, we’re sorry to inform you that your...</title><description>&lt;img src="http://29.media.tumblr.com/s6m5iyF8M9lrdlmkK8t2X6NR_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Mr and Mrs Systems, we’re sorry to inform you that your child, Adobe, has received yet another &lt;b&gt;F&lt;/b&gt;. This ongoing string of fails is a concern to us, and in light of &lt;a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&amp;catid=672&amp;threadid=1366157&amp;enterthread=y#4972408"&gt;recent anti-social behaviour&lt;/a&gt;, we’re left with no alternative but to threaten expulsion.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/36526268</link><guid>http://wisdom.inventivelabs.com.au/post/36526268</guid><pubDate>Thu, 29 May 2008 23:23:00 -0400</pubDate></item><item><title>Alarming events in the life of your Rails project #1: you’ve just written a Rake task labelled...</title><description>&lt;p&gt;Alarming events in the life of your Rails project #1: you’ve just written a Rake task labelled &lt;code&gt;:armageddon&lt;/code&gt;. True story. Actually, some theologians posit that the event in question has already occurred, when (unrelatedly) I dropped down to SQL this morning and executed &lt;code&gt;DELETE FROM users WHERE god IS NULL&lt;/code&gt;.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/35414567</link><guid>http://wisdom.inventivelabs.com.au/post/35414567</guid><pubDate>Tue, 20 May 2008 06:02:59 -0400</pubDate></item><item><title>Oy, some of my old code found its way into Warehouse a while...</title><description>&lt;img src="http://25.media.tumblr.com/s6m5iyF8M91on9mzpp7NWsCD_500.gif"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Oy, some of my old code found its way into &lt;a href="http://warehouseapp.com/"&gt;Warehouse&lt;/a&gt; a while back. Cheers for the shout, ActiveReload.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/34970045</link><guid>http://wisdom.inventivelabs.com.au/post/34970045</guid><pubDate>Thu, 15 May 2008 22:11:35 -0400</pubDate></item><item><title>MacVim vs YAML</title><description>&lt;p&gt;Recent builds of MacVim (23 to 26, at least) contain a broken YAML syntax file. You need to replace it with this one: &lt;a href="http://www.vim.org/scripts/script.php?script_id=739"&gt;yaml.vim&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It goes in &lt;code&gt;$VIMRUNTIME/syntax&lt;/code&gt;, which normally resolves to &lt;code&gt;/Applications/MacVim.app/Contents/Resources/vim/runtime/syntax&lt;/code&gt; — but you can run &lt;code&gt;:echo $VIMRUNTIME&lt;/code&gt; in MacVim to be sure.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/34746660</link><guid>http://wisdom.inventivelabs.com.au/post/34746660</guid><pubDate>Wed, 14 May 2008 02:17:00 -0400</pubDate></item><item><title>Protecting the auto-migrating schema</title><description>&lt;p&gt;If you’re using Err’s &lt;a href="http://github.com/pjhyett/auto_migrations"&gt;Auto Migrations&lt;/a&gt;, you’ll want to eradicate a default Rails task that clobbers your carefully-crafted schema file.

Add this to your Rakefile:

&lt;pre&gt;&lt;code language="ruby"&gt;Rake.application.instance_variable_get(:@tasks).delete(
  'db:schema:dump'
)
namespace(:db) {
  namespace(:schema) {
    task(:dump) { puts 'Schema dump disabled' }
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/34598023</link><guid>http://wisdom.inventivelabs.com.au/post/34598023</guid><pubDate>Mon, 12 May 2008 20:38:00 -0400</pubDate></item><item><title>Processing.js</title><description>&lt;a href="http://dev.jquery.com/~john/processing.js/"&gt;Processing.js&lt;/a&gt;</description><link>http://wisdom.inventivelabs.com.au/post/34304535</link><guid>http://wisdom.inventivelabs.com.au/post/34304535</guid><pubDate>Sat, 10 May 2008 01:26:23 -0400</pubDate></item><item><title>Labnotes » Git forking for fun and profit</title><description>&lt;a href="http://blog.labnotes.org/2008/04/30/git-forking-for-fun-and-profit/"&gt;Labnotes » Git forking for fun and profit&lt;/a&gt;</description><link>http://wisdom.inventivelabs.com.au/post/33403568</link><guid>http://wisdom.inventivelabs.com.au/post/33403568</guid><pubDate>Thu, 01 May 2008 04:18:10 -0400</pubDate></item><item><title>Using Visor</title><description>&lt;a href="http://chaffin.ch/8/helpful-hacks-for-becoming-a-terminal-guru"&gt;Using Visor&lt;/a&gt;: &lt;p&gt;Nice and neat for the part-time Terminal user (ie, me).&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/33048968</link><guid>http://wisdom.inventivelabs.com.au/post/33048968</guid><pubDate>Sun, 27 Apr 2008 19:21:54 -0400</pubDate></item><item><title>"It is good to know the truth, but it is better to speak of palm trees."</title><description>“It is good to know the truth, but it is better to speak of palm trees.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Arab Proverb&lt;/em&gt;</description><link>http://wisdom.inventivelabs.com.au/post/32508668</link><guid>http://wisdom.inventivelabs.com.au/post/32508668</guid><pubDate>Tue, 22 Apr 2008 07:08:40 -0400</pubDate></item><item><title>Tempfiles and very large multipart forms</title><description>&lt;p&gt;Ignore the fact that problems with very large forms suggest a user interface refactoring is on the cards. When a form is multipart, &lt;a href="http://dev.rubyonrails.org/ticket/3805"&gt;the Ruby CGI module creates a Tempfile for many or all of the fields&lt;/a&gt;, which on some systems causes the process to die horribly emitting Last Words like:

&lt;pre&gt;&lt;code&gt;Errno::EMFILE: Too many open files&lt;/code&gt;&lt;/pre&gt;

This is a workaround that verges on a hack. Adding it to config/environment.rb in a Rails app at least allows one to proceed.

&lt;pre&gt;&lt;code&gt;Process.setrlimit(Process::RLIMIT_NOFILE, 1024)&lt;/code&gt;&lt;/pre&gt;

Brought to you by the Dept of Tuesday Morning Frustrations.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/32465027</link><guid>http://wisdom.inventivelabs.com.au/post/32465027</guid><pubDate>Mon, 21 Apr 2008 20:14:00 -0400</pubDate></item><item><title>"The player itself is as stripped back as we could make it. We though carefully about what buttons we..."</title><description>“The player itself is as stripped back as we could make it. We though carefully about what buttons we needed - why have a stop button, if you have play and pause? Why have FF or REW if you can drag the play head anyway. We added duration a while later, as it seemed useful, and the double-size icon is discreet, but works. And that’s it.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.cityofsound.com/blog/2008/04/monocle-design.html"&gt;cityofsound: Monocle: design notes&lt;/a&gt;&lt;/em&gt;</description><link>http://wisdom.inventivelabs.com.au/post/31693410</link><guid>http://wisdom.inventivelabs.com.au/post/31693410</guid><pubDate>Mon, 14 Apr 2008 02:06:40 -0400</pubDate></item><item><title>".searchbar-engine-image {
  margin-left: -11px !important;
  margin-right: 2px !important;
 ..."</title><description>“&lt;pre&gt;&lt;code&gt;.searchbar-engine-image {
  margin-left: -11px !important;
  margin-right: 2px !important;
  display: -moz-box !important;
  background-color: #fff !important;
}
&lt;/code&gt;&lt;/pre&gt;”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.takebacktheweb.org/CaE.html"&gt;How to use a Firefox3 GrApple theme and still see search engine icons (if you happen to be a Cmd-K, Cmd-Down type)&lt;/a&gt;&lt;/em&gt;</description><link>http://wisdom.inventivelabs.com.au/post/31242876</link><guid>http://wisdom.inventivelabs.com.au/post/31242876</guid><pubDate>Wed, 09 Apr 2008 09:05:00 -0400</pubDate></item><item><title>Let my People Have Root</title><description>&lt;a href="http://www.joyeur.com/2008/04/08/let-my-people-have-root"&gt;Let my People Have Root&lt;/a&gt;: &lt;p&gt;I am at times wary of Joyent, but on this subject I agree with them. We’re looking forward to trying out some Google Apps here at the Labs, but our inclination to create one is born of merely mild curiousity, which we probably won’t indulge. Certainly nothing serious, for the reasons given in the link.&lt;/p&gt;</description><link>http://wisdom.inventivelabs.com.au/post/31242528</link><guid>http://wisdom.inventivelabs.com.au/post/31242528</guid><pubDate>Wed, 09 Apr 2008 09:00:14 -0400</pubDate></item></channel></rss>
