<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.jennyandlih.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Tech</title>
 <link>http://www.jennyandlih.com/note-type/tech</link>
 <description>The taxonomy view.</description>
 <language>en</language>
<item>
 <title>Setting up a network printer</title>
 <link>http://www.jennyandlih.com/setting-network-printer</link>
 <description>&lt;p&gt;Providing you have a working local printer using CUPS, it&#039;s quite easy to share it across a local subnet.&lt;/p&gt;
&lt;p&gt;In &lt;code&gt;/etc/cups/cupsd.conf&lt;/code&gt; on the CUPS server, add a line directly after this line:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Listen localhost:631&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;...using the IP of the server:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Listen localhost:631&lt;br /&gt;Listen 10.0.0.2:631&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;In the same file, locate this section:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;# Restrict access to the server...&lt;br /&gt;&amp;lt;Location /&amp;gt;&lt;br /&gt;&amp;nbsp; Order allow,deny&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;br /&gt;&lt;br /&gt;# Restrict access to the admin pages...&lt;br /&gt;&amp;lt;Location /admin&amp;gt;&lt;br /&gt;&amp;nbsp; Order allow,deny&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jennyandlih.com/setting-network-printer&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.jennyandlih.com/setting-network-printer#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/cups">CUPS</category>
 <pubDate>Thu, 13 Nov 2008 14:59:44 -0800</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">815 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Renaming a printer</title>
 <link>http://www.jennyandlih.com/renaming-printer</link>
 <description>&lt;p&gt;Occasionally, CUPS will magically choose a printer name for you that you didn&#039;t specify and don&#039;t like, and then not give you the option to change it.  Fortunately, you can fix this by editing the config file:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;sudo vi /etc/cups/printers.conf&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Locate the offending line, eg:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;Printer Printing_Protocol&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/printer&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;...and change it to something more palatable:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;Printer Canon-i960&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/printer&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Restart CUPS:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;/etc/init.d/cupsys restart&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
</description>
 <comments>http://www.jennyandlih.com/renaming-printer#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/cups">CUPS</category>
 <pubDate>Thu, 13 Nov 2008 14:58:12 -0800</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">814 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>411 Length Required</title>
 <link>http://www.jennyandlih.com/411-length-required</link>
 <description>&lt;p&gt;Was getting a &lt;code&gt;411&lt;/code&gt; error response with the message &lt;code&gt;Length Required&lt;/code&gt; when making an ajax call from jQuery... the unexpected solution is to pass in an empty data object, like so:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$.ajax({&lt;br /&gt;&amp;nbsp; url: url,&lt;br /&gt;&amp;nbsp; type: &amp;#039;POST&amp;#039;,&lt;br /&gt;&amp;nbsp; data: {},&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; &amp;lt;- set empty data&lt;br /&gt;&amp;nbsp; success: function(data, textStatus) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do something&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;}); &lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&quot;http://groups.google.com/group/jquery-en/browse_thread/thread/22828981cf23bdc4&quot; title=&quot;http://groups.google.com/group/jquery-en/browse_thread/thread/22828981cf23bdc4&quot;&gt;http://groups.google.com/group/jquery-en/browse_thread/thread/22828981cf...&lt;/a&gt;&lt;/p&gt;
</description>
 <comments>http://www.jennyandlih.com/411-length-required#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/jquery">jQuery</category>
 <pubDate>Sun, 28 Sep 2008 17:30:13 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">769 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Flashing a BIOS with an exe in Ubuntu</title>
 <link>http://www.jennyandlih.com/flashing-bios-exe-ubuntu</link>
 <description>&lt;p&gt;For step-by-step instructions, go read &lt;a href=&quot;http://www.linuxinsight.com/how-to-flash-motherboard-bios-from-linux-no-dos-windows-no-floppy-drive.html&quot;&gt;the mastermind&#039;s article&lt;/a&gt;, from which this is derived.  This is mostly for my future reference.  I was given an exe (&lt;code&gt;M1330A12.EXE&lt;/code&gt;) by Dell and told to flash my BIOS with it.  Right.  Then I was given &lt;a href=&quot;http://hp.vector.co.jp/authors/VA004958/bootcd/index_e.html&quot;&gt;the world&#039;s most incomprehensible instructions&lt;/a&gt; on how to supposedly get it working with linux.  Thank god for the aforementioned article -- the following worked like a charm.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jennyandlih.com/flashing-bios-exe-ubuntu&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.jennyandlih.com/flashing-bios-exe-ubuntu#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/ubuntu">Ubuntu</category>
 <pubDate>Wed, 03 Sep 2008 19:22:47 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">747 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Setting a CCK default value for old nodes</title>
 <link>http://www.jennyandlih.com/setting-cck-default-value-old-nodes</link>
 <description>&lt;p&gt;I added a brand-new cck field to a content type which already had a bunch of nodes, but previously had no cck fields.  This new field needed to have a default value set for all existing nodes.  Of course, editing an old node and saving it without making any changes would set an appropriate default value... but I couldn&#039;t manually do that for all the nodes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jennyandlih.com/setting-cck-default-value-old-nodes&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.jennyandlih.com/setting-cck-default-value-old-nodes#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/drupal">Drupal</category>
 <pubDate>Tue, 26 Aug 2008 21:21:08 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">735 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>UPDATE using JOIN</title>
 <link>http://www.jennyandlih.com/update-using-join</link>
 <description>&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;update content_type_message ctm join node n on ctm.nid = n.nid set&lt;br /&gt;&amp;nbsp; ctm.field_message_recipientalert_value = unix_timestamp(date_add(n.created, interval 24 hour)), &lt;br /&gt;&amp;nbsp; ctm.field_message_senderalert_value = unix_timestamp(date_add(n.created, interval 24 hour));&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;From &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/update.html&quot;&gt;12.2.10. UPDATE Syntax&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;div class=&quot;bq-inner&quot;&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jennyandlih.com/update-using-join&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.jennyandlih.com/update-using-join#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/mysql">MySQL</category>
 <pubDate>Fri, 18 Jul 2008 11:58:29 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">694 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Reading a single character from stdin</title>
 <link>http://www.jennyandlih.com/reading-single-character-stdin</link>
 <description>&lt;p&gt;Why there isn&#039;t an easier way of doing this, I have no idea.  It&#039;d be nice if this would work:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;sys.stdin.read(1)&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;...however, because the file is a tty, nothing gets read until the user hits enter.&lt;/p&gt;
&lt;p&gt;Enter getch.  It&#039;s a utility written by Danny Yoo and stolen from a posting I found on google: &lt;a href=&quot;http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/134892&quot;&gt;ASPN : Python Cookbook : getch()-like unbuffered character reading from stdin on both Windows and Unix&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;&lt;div class=&quot;bq-inner&quot;&gt;
&lt;p&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jennyandlih.com/reading-single-character-stdin&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.jennyandlih.com/reading-single-character-stdin#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/python">Python</category>
 <pubDate>Thu, 10 Jul 2008 17:56:52 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">678 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Paging output</title>
 <link>http://www.jennyandlih.com/paging-output</link>
 <description>&lt;p&gt;Let Python determine the best pager available:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;import pydoc&lt;br /&gt;pydoc.pager(text)&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This may pipe the text into an external program like less or more.&lt;/p&gt;
&lt;p&gt;...or explicitly use the built-in pager:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;import pydoc&lt;br /&gt;pydoc.ttypager(text)&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&quot;http://www.velocityreviews.com/forums/t584112-paging-in-python-shell.html&quot; title=&quot;http://www.velocityreviews.com/forums/t584112-paging-in-python-shell.html&quot;&gt;http://www.velocityreviews.com/forums/t584112-paging-in-python-shell.htm...&lt;/a&gt;&lt;/p&gt;
</description>
 <comments>http://www.jennyandlih.com/paging-output#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/python">Python</category>
 <pubDate>Thu, 10 Jul 2008 17:19:57 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">677 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Resolved: Logging to Firebug console breaks IE</title>
 <link>http://www.jennyandlih.com/resolved-logging-firebug-console-breaks-ie</link>
 <description>&lt;p&gt;The firebug console is great for debugging javascript -- but it&#039;s &lt;b&gt;really&lt;/b&gt; annoying when you want to quickly check something in IE and can&#039;t without first removing all your debug statements to avoid a bunch of javascript errors.&lt;/p&gt;
&lt;p&gt;Here&#039;s a handy log function which checks first that firebug is in use before trying to log to the console.  The function is a no-op in IE.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;log_debug = function() {&lt;br /&gt;&amp;nbsp; if(window.console &amp;amp;&amp;amp; window.console.firebug) console.log.apply(this, arguments)&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;log_debug(&amp;#039;foo&amp;#039;, &amp;#039;bar&amp;#039;, &amp;#039;bash&amp;#039;)&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
</description>
 <comments>http://www.jennyandlih.com/resolved-logging-firebug-console-breaks-ie#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/firefox">firefox</category>
 <category domain="http://www.jennyandlih.com/note-type/tech/javascript">JavaScript</category>
 <category domain="http://www.jennyandlih.com/note-type/tech/jquery">jQuery</category>
 <category domain="http://www.jennyandlih.com/note-type/tech/windoze">Windoze</category>
 <pubDate>Sat, 07 Jun 2008 17:05:15 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">652 at http://www.jennyandlih.com</guid>
</item>
<item>
 <title>Setting up puppet on Debian</title>
 <link>http://www.jennyandlih.com/setting-puppet-debian</link>
 <description>&lt;p&gt;Debian seems to think the default puppetmaster port is &lt;code&gt;18140&lt;/code&gt;... but  all the documentation I found and my puppet client running on Ubuntu says the default port is &lt;code&gt;8140&lt;/code&gt;.  Strange.&lt;/p&gt;
&lt;p&gt;Opening the configuration file &lt;code&gt;/etc/default/puppetmaster&lt;/code&gt; and changing the last line to the right port did the trick.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;PORT=8140&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I also got the following error when trying to use my newly-signed client certificate:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;notice: Got signed certificate&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.jennyandlih.com/setting-puppet-debian&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.jennyandlih.com/setting-puppet-debian#comments</comments>
 <category domain="http://www.jennyandlih.com/note-type/tech/debian">Debian</category>
 <category domain="http://www.jennyandlih.com/note-type/tech/puppet">Puppet</category>
 <pubDate>Fri, 16 May 2008 21:54:45 -0700</pubDate>
 <dc:creator>jenny</dc:creator>
 <guid isPermaLink="false">623 at http://www.jennyandlih.com</guid>
</item>
</channel>
</rss>
