<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Jaharmi’s Irreality</title>
  <subtitle>renewable hyperlinks with 0% transfat since 1999</subtitle>
  <link rel="alternate" type="text/html" href="http://www.jaharmi.com"/>
  <link rel="self" type="application/atom+xml" href="http://www.jaharmi.com/atom/feed"/>
  <id>http://www.jaharmi.com/atom/feed</id>
  <updated>2008-05-20T10:18:08-04:00</updated>
  <entry>
    <title>Is that site running Drupal, curl edition</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/07/02/is_that_site_running_drupal_curl_edition" />
    <id>http://www.jaharmi.com/2008/07/02/is_that_site_running_drupal_curl_edition</id>
    <published>2008-07-02T09:45:02-04:00</published>
    <updated>2008-07-02T11:45:53-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Computing" />
    <category term="Discovery" />
    <category term="Drupal" />
    <category term="Open source" />
    <category term="Shell" />
    <category term="Software" />
    <category term="System administration" />
    <category term="UNIX" />
    <category term="Web" />
    <category term="Design" />
    <category term="Security" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>The <a class="freelinking external" href="http://www.lullabot.com/">Lullabot</a> Web site has a clever way to help answer the question of &ldquo;<a class="freelinking external" href="http://www.lullabot.com/articles/is-site-running-drupal">Is that site running Drupal?</a>&rdquo; Angie Byron mentions that the HTTP &ldquo;Expires&rdquo; header returned by Drupal corresponds to a specific default date. Look for that date in the HTTP headers, and you can make a reasonable guess that a site is a Drupal site &mdash; or at least one that hasn&rsquo;t modified one of the core files.<br />
Some commenters posted notes about how to do the same thing with wget and then curl. I expanded on the curl instructions to make them a little more robust (especially in the case of redirects or URL rewriting), and here&rsquo;s the result:<br />
<code>$ <strong>curl -fsIL http://jaharmi.com/ 2&gt;&amp;1 | grep -q -m 1 "Expires: Sun, 19 Nov 1978 05:00:00 GMT" &amp;&amp; echo "Yes, this appears to be a Drupal site." || echo "No, this does not appear to be a Drupal site."</strong><br />
Yes, this appears to be a Drupal site.</code></p>
    ]]></summary>
    <content type="html"><![CDATA[<p>The <a class="freelinking external" href="http://www.lullabot.com/">Lullabot</a> Web site has a clever way to help answer the question of &ldquo;<a class="freelinking external" href="http://www.lullabot.com/articles/is-site-running-drupal">Is that site running Drupal?</a>&rdquo; Angie Byron mentions that the HTTP &ldquo;Expires&rdquo; header returned by Drupal corresponds to a specific default date. Look for that date in the HTTP headers, and you can make a reasonable guess that a site is a Drupal site &mdash; or at least one that hasn&rsquo;t modified one of the core files.</p>
<p>Some commenters posted notes about how to do the same thing with wget and then curl. I expanded on the curl instructions to make them a little more robust (especially in the case of redirects or URL rewriting), and here&rsquo;s the result:</p>
<p><code>$ <strong>curl -fsIL http://jaharmi.com/ 2&gt;&amp;1 | grep -q -m 1 "Expires: Sun, 19 Nov 1978 05:00:00 GMT" &amp;&amp; echo "Yes, this appears to be a Drupal site." || echo "No, this does not appear to be a Drupal site."</strong><br />
Yes, this appears to be a Drupal site.</code></p>
    ]]></content>
  </entry>
  <entry>
    <title>Navigating through files with less</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/06/16/navigating_through_files_with_less" />
    <id>http://www.jaharmi.com/2008/06/16/navigating_through_files_with_less</id>
    <published>2008-06-16T12:07:01-04:00</published>
    <updated>2008-06-20T16:47:36-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Computing" />
    <category term="Exploration" />
    <category term="Mac OS X" />
    <category term="Open source" />
    <category term="Shell" />
    <category term="Software" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>It&rsquo;s taken about a decade but I finally read the man page for &ldquo;less.&rdquo; Here are some important keyboard commands for navigating through files with it that I wanted to note for my own future use. If someone else gets a benefit from this, great, but it&rsquo;s already helping me jump through man pages with more ease. (And it gave me an opportunity to write a post with a really ambiguous title.)</p>
<table>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
<tr>
<td>f</td>
<td>Move forward one screen</td>
</tr>
<tr>
<td>b</td>
<td>Move backward one screen</td>
</tr>
<tr>
<td>j</td>
<td>Move forward one line</td>
</tr>
<tr>
<td>y</td>
<td>Move backward one line</td>
</tr>
<tr>
<td>=</td>
<td>Show the number of lines and your progress through the file</td>
</tr>
<tr>
<td>&lt;</td>
<td>Move to the beginning of the file</td>
</tr>
<tr>
<td>&gt;</td>
<td>Move to the end of the file</td>
</tr>
<tr>
<td>%</td>
<td>Scroll to the position in the file represented by the number before the percent sign</td>
</tr>
</table>
<p>These commands had eluded me for a long time, even though it would have been great to know them. After all, <code>less</code> is the default pager in Mac OS X. Thanks to the wonders of air travel, I had some time to read some off-line documentation.<br />
Of course, I&rsquo;ve long used &ldquo;/&rdquo; followed by some text to search through man pages, and that&rsquo;s worth knowing if you don&rsquo;t already. One useful trick I picked up was the search &ldquo;/^EXAM&rdquo; (props to <a class="freelinking external" href="http://blogs.bwerp.net/">Adam</a> for mentioning the caret and making my recipe one character longer, but more specific) to search for the examples section.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>It&rsquo;s taken about a decade but I finally read the man page for &ldquo;less.&rdquo; Here are some important keyboard commands for navigating through files with it that I wanted to note for my own future use. If someone else gets a benefit from this, great, but it&rsquo;s already helping me jump through man pages with more ease. (And it gave me an opportunity to write a post with a really ambiguous title.)</p>
<table>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
<tr>
<td>f</td>
<td>Move forward one screen</td>
</tr>
<tr>
<td>b</td>
<td>Move backward one screen</td>
</tr>
<tr>
<td>j</td>
<td>Move forward one line</td>
</tr>
<tr>
<td>y</td>
<td>Move backward one line</td>
</tr>
<tr>
<td>=</td>
<td>Show the number of lines and your progress through the file</td>
</tr>
<tr>
<td>&lt;</td>
<td>Move to the beginning of the file</td>
</tr>
<tr>
<td>&gt;</td>
<td>Move to the end of the file</td>
</tr>
<tr>
<td>%</td>
<td>Scroll to the position in the file represented by the number before the percent sign</td>
</tr>
</table>
<p>These commands had eluded me for a long time, even though it would have been great to know them. After all, <code>less</code> is the default pager in Mac OS X. Thanks to the wonders of air travel, I had some time to read some off-line documentation.</p>
<p>Of course, I&rsquo;ve long used &ldquo;/&rdquo; followed by some text to search through man pages, and that&rsquo;s worth knowing if you don&rsquo;t already. One useful trick I picked up was the search &ldquo;/^EXAM&rdquo; (props to <a class="freelinking external" href="http://blogs.bwerp.net/">Adam</a> for mentioning the caret and making my recipe one character longer, but more specific) to search for the examples section.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Ambivalence, survival, and confidence</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/06/16/ambivalence_survival_and_confidence_0" />
    <id>http://www.jaharmi.com/2008/06/16/ambivalence_survival_and_confidence_0</id>
    <published>2008-06-16T12:04:05-04:00</published>
    <updated>2008-06-16T12:04:10-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Computing" />
    <category term="Family" />
    <category term="Friends" />
    <category term="Technology" />
    <category term="World" />
    <summary type="html"><![CDATA[<p>Despite my general feeling of ambivalence toward Apple WWDC 2008 this year, I have woken up on the day after the conclusion of my trip with a feeling of confidence.<br />
I&rsquo;m sure that will wear off in the coming hours, days, and months, but my state of mind right now is very positive. I wanted to remember I had it. Perhaps the biggest single contributor to this feeling is enduring of 22 hours of travel &mdash; and 37 straight hours awake &mdash; on the way back. Survival can really lift your spirits.<br />
I woke up this morning with a craving for music by Mike Doughty, so I played <a class="freelinking external" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=57113094&amp;id=57113096&amp;s=143441">&ldquo;Looking at the World from the Botton of a Well&rdquo;</a>. It hit the spot. (<a class="freelinking external" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=266849176&amp;id=266849158&amp;s=143441">&ldquo;27 Jennifers&rdquo;</a> is on the <a class="freelinking external" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=282761548&amp;s=143441">WWDC 2008 iMix</a>, but it doesn&rsquo;t fit my mood nearly as well.)<br />
It was great to see everyone this year &mdash; some old friends and some new friends. The relationships truly make the conference for me, now that I&rsquo;ve been to so many sessions that just change incrementally each year. This is true even if I didn&rsquo;t follow everyone to Dave&rsquo;s afterwards; maybe that&rsquo;s for another year.<br />
I was surprised at the amount of movement within and between organizations &#8230; so many people I know have different jobs (and even <em>homes</em>) since I last saw them in 2006. The Mac landscape is changing. Even with its growth, it could be maturing. That kind of positive sign can breed confidence, too.<br />
It was especially meaningful to me to be able to visit some friends of the family on the first weekend, and then my best friend&rsquo;s family on the second.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Despite my general feeling of ambivalence toward Apple WWDC 2008 this year, I have woken up on the day after the conclusion of my trip with a feeling of confidence.</p>
<p>I&rsquo;m sure that will wear off in the coming hours, days, and months, but my state of mind right now is very positive. I wanted to remember I had it. Perhaps the biggest single contributor to this feeling is enduring of 22 hours of travel &mdash; and 37 straight hours awake &mdash; on the way back. Survival can really lift your spirits.</p>
<p>I woke up this morning with a craving for music by Mike Doughty, so I played <a class="freelinking external" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=57113094&amp;id=57113096&amp;s=143441">&ldquo;Looking at the World from the Botton of a Well&rdquo;</a>. It hit the spot. (<a class="freelinking external" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=266849176&amp;id=266849158&amp;s=143441">&ldquo;27 Jennifers&rdquo;</a> is on the <a class="freelinking external" href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=282761548&amp;s=143441">WWDC 2008 iMix</a>, but it doesn&rsquo;t fit my mood nearly as well.)</p>
<p>It was great to see everyone this year &mdash; some old friends and some new friends. The relationships truly make the conference for me, now that I&rsquo;ve been to so many sessions that just change incrementally each year. This is true even if I didn&rsquo;t follow everyone to Dave&rsquo;s afterwards; maybe that&rsquo;s for another year.</p>
<p>I was surprised at the amount of movement within and between organizations &#8230; so many people I know have different jobs (and even <em>homes</em>) since I last saw them in 2006. The Mac landscape is changing. Even with its growth, it could be maturing. That kind of positive sign can breed confidence, too.</p>
<p>It was especially meaningful to me to be able to visit some friends of the family on the first weekend, and then my best friend&rsquo;s family on the second.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Comparing Radmind command file timestamps between client and server</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/06/08/comparing_radmind_command_file_timestamps_between_client_and_server" />
    <id>http://www.jaharmi.com/2008/06/08/comparing_radmind_command_file_timestamps_between_client_and_server</id>
    <published>2008-06-08T23:58:44-04:00</published>
    <updated>2008-06-09T00:05:18-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Discovery" />
    <category term="Exploration" />
    <category term="Mac OS X" />
    <category term="Software" />
    <category term="System administration" />
    <category term="Leopard" />
    <category term="Security" />
    <summary type="html"><![CDATA[<p>In trying to determine the age of the command file on a Radmind client &mdash; in this case, a Mac OS X 10.5 Leopard system &mdash; I learned that its modification date is the same as on the server. This is true on multiple clients I examined, so I believe it to be both consistent and intentional. It also makes sense.<br />
What timestamp, then, can you use to determine how old your command file is, or when your client last updated?<br />
Let&rsquo;s look into this. For example, here is the command file on a client:<br />
<code>[RadmindClientA]$ <strong>ls -ul /private/var/radmind/client | grep command.K</strong><br />
-rw-r--r--  1 root  wheel       667 Jun  3 05:30 command.K<br />
[RadmindClientA]$ <strong>ls -cl /private/var/radmind/client | grep command.K</strong><br />
-rw-r--r--  1 root  wheel       667 May 29 10:28 command.K<br />
[RadmindClientA]$ <strong>ls -l /private/var/radmind/client | grep command.K</strong><br />
-rw-r--r--  1 root  wheel       667 May 29 10:21 command.K</code><br />
And the same file examined on the server:<br />
<code>[RadmindServer]$ <strong>ls -ul /private/var/radmind/command | grep selected-client-command.K</strong><br />
-rw-r-----   1 root  wheel    667 Jun  3 05:27 selected-client-command.K<br />
[RadmindServer]$ <strong>ls -cl /private/var/radmind/command | grep selected-client-command.K</strong><br />
-rw-r-----   1 root  wheel    667 May 29 10:21 selected-client-command.K<br />
[RadmindServer]$ <strong>ls -l /private/var/radmind/command | grep selected-client-command.K</strong><br />
-rw-r-----   1 root  wheel    667 May 29 10:21 selected-client-command.K</code><br />
The status change time (<code>ls -cl</code>) is a little bit harder to understand. I&#8217;ve seen it minutes apart from the modification time on a client, but it is the same as the modification time when viewed on the server.<br />
The access time (<code>ls -ul</code>) of the command file on the client, however, simply corresponds to when <code>ktcheck</code> last ran.<br />
For good measure, another client:<br />
<code>[RadmindClientB]$ <strong>ls -ul /private/var/radmind/client/ | grep command.K</strong><br />
-rw-r--r--  1 root  wheel      1188 Jun  5 05:08 command.K<br />
[RadmindClientB]$ <strong>ls -cl /private/var/radmind/client/ | grep command.K</strong><br />
-rw-r--r--  1 root  wheel      1188 Jun  3 14:13 command.K<br />
[RadmindClientB]$ <strong>ls -l /private/var/radmind/client/ | grep command.K</strong><br />
-rw-r--r--  1 root  wheel      1188 Jun  3 14:09 command.K</code><br />
And its command file on the server:<br />
<code>[RadmindServer]$ <strong>ls -ul /private/var/radmind/command | grep another-selected-client-command.K</strong><br />
-rw-r--r--   1 root  wheel   1188 Jun  4 05:13 another-selected-client-command.K<br />
[RadmindServer]$ <strong>ls -cl /private/var/radmind/command | grep another-selected-client-command.K</strong><br />
-rw-r--r--   1 root  wheel   1188 Jun  3 14:09 another-selected-client-command.K<br />
[RadmindServer]$ <strong>ls -l /private/var/radmind/command | grep another-selected-client-command.K</strong><br />
-rw-r--r--   1 root  wheel   1188 Jun  3 14:09 another-selected-client-command.K</code><br />
I looked into this because I was wondering why <code>ktcheck -C</code> (to &ldquo;clean&rdquo; the /private/var/radmind/client directory) wasn&rsquo;t having the effect I expected. I thought it cleared out the client directory and started with fresh files, which would all have new timestamps because they were new to the client. When I didn&rsquo;t get the new timestamps I anticipated, I worked through what I saw until I settled on this explanation.<br />
The result? The main means you have of determining whether the command file has been updated is its access time. The access timestamp corresponds with the date and time of the last <code>ktcheck</code> action. This appears to be the case no matter which flags I&rsquo;ve used with <code>ktcheck</code> &mdash; even with <code>ktcheck -n</code> (where &ldquo;no files are modified&rdquo;).<br />
The modification time, for all intents and purposes, only indicates when the file was last changed <em>on the server</em>. Testing this out &mdash; with command files that have been overwritten with the exact same contents (using <code>cat</code>), as well as command files deleted on the client before <code>ktcheck</code> &mdash; I have reached the conclusion that the modification time changes only when the file contents do.<br />
So, I don&rsquo;t have solid explanations for all of this. But, I&rsquo;m now armed with the knowledge that the access timestamp is the most important when you&rsquo;re looking for the age &mdash; or at least the last refresh time &mdash; of a Radmind client&rsquo;s command file.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In trying to determine the age of the command file on a Radmind client &mdash; in this case, a Mac OS X 10.5 Leopard system &mdash; I learned that its modification date is the same as on the server. This is true on multiple clients I examined, so I believe it to be both consistent and intentional. It also makes sense.</p>
<p>What timestamp, then, can you use to determine how old your command file is, or when your client last updated?</p>
<p>Let&rsquo;s look into this. For example, here is the command file on a client:</p>
<p><code>[RadmindClientA]$ <strong>ls -ul /private/var/radmind/client | grep command.K</strong><br />
-rw-r--r--  1 root  wheel       667 Jun  3 05:30 command.K<br />
[RadmindClientA]$ <strong>ls -cl /private/var/radmind/client | grep command.K</strong><br />
-rw-r--r--  1 root  wheel       667 May 29 10:28 command.K<br />
[RadmindClientA]$ <strong>ls -l /private/var/radmind/client | grep command.K</strong><br />
-rw-r--r--  1 root  wheel       667 May 29 10:21 command.K</code></p>
<p>And the same file examined on the server:</p>
<p><code>[RadmindServer]$ <strong>ls -ul /private/var/radmind/command | grep selected-client-command.K</strong><br />
-rw-r-----   1 root  wheel    667 Jun  3 05:27 selected-client-command.K<br />
[RadmindServer]$ <strong>ls -cl /private/var/radmind/command | grep selected-client-command.K</strong><br />
-rw-r-----   1 root  wheel    667 May 29 10:21 selected-client-command.K<br />
[RadmindServer]$ <strong>ls -l /private/var/radmind/command | grep selected-client-command.K</strong><br />
-rw-r-----   1 root  wheel    667 May 29 10:21 selected-client-command.K</code></p>
<p>The status change time (<code>ls -cl</code>) is a little bit harder to understand. I&#8217;ve seen it minutes apart from the modification time on a client, but it is the same as the modification time when viewed on the server.</p>
<p>The access time (<code>ls -ul</code>) of the command file on the client, however, simply corresponds to when <code>ktcheck</code> last ran.</p>
<p>For good measure, another client:</p>
<p><code>[RadmindClientB]$ <strong>ls -ul /private/var/radmind/client/ | grep command.K</strong><br />
-rw-r--r--  1 root  wheel      1188 Jun  5 05:08 command.K<br />
[RadmindClientB]$ <strong>ls -cl /private/var/radmind/client/ | grep command.K</strong><br />
-rw-r--r--  1 root  wheel      1188 Jun  3 14:13 command.K<br />
[RadmindClientB]$ <strong>ls -l /private/var/radmind/client/ | grep command.K</strong><br />
-rw-r--r--  1 root  wheel      1188 Jun  3 14:09 command.K</code></p>
<p>And its command file on the server:</p>
<p><code>[RadmindServer]$ <strong>ls -ul /private/var/radmind/command | grep another-selected-client-command.K</strong><br />
-rw-r--r--   1 root  wheel   1188 Jun  4 05:13 another-selected-client-command.K<br />
[RadmindServer]$ <strong>ls -cl /private/var/radmind/command | grep another-selected-client-command.K</strong><br />
-rw-r--r--   1 root  wheel   1188 Jun  3 14:09 another-selected-client-command.K<br />
[RadmindServer]$ <strong>ls -l /private/var/radmind/command | grep another-selected-client-command.K</strong><br />
-rw-r--r--   1 root  wheel   1188 Jun  3 14:09 another-selected-client-command.K</code></p>
<p>I looked into this because I was wondering why <code>ktcheck -C</code> (to &ldquo;clean&rdquo; the /private/var/radmind/client directory) wasn&rsquo;t having the effect I expected. I thought it cleared out the client directory and started with fresh files, which would all have new timestamps because they were new to the client. When I didn&rsquo;t get the new timestamps I anticipated, I worked through what I saw until I settled on this explanation.</p>
<p>The result? The main means you have of determining whether the command file has been updated is its access time. The access timestamp corresponds with the date and time of the last <code>ktcheck</code> action. This appears to be the case no matter which flags I&rsquo;ve used with <code>ktcheck</code> &mdash; even with <code>ktcheck -n</code> (where &ldquo;no files are modified&rdquo;).</p>
<p>The modification time, for all intents and purposes, only indicates when the file was last changed <em>on the server</em>. Testing this out &mdash; with command files that have been overwritten with the exact same contents (using <code>cat</code>), as well as command files deleted on the client before <code>ktcheck</code> &mdash; I have reached the conclusion that the modification time changes only when the file contents do.</p>
<p>So, I don&rsquo;t have solid explanations for all of this. But, I&rsquo;m now armed with the knowledge that the access timestamp is the most important when you&rsquo;re looking for the age &mdash; or at least the last refresh time &mdash; of a Radmind client&rsquo;s command file.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Change the name of an application in your LaunchBar configuration</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/06/08/change_the_name_of_application_in_your_launchbar_configuration" />
    <id>http://www.jaharmi.com/2008/06/08/change_the_name_of_application_in_your_launchbar_configuration</id>
    <published>2008-06-08T23:48:15-04:00</published>
    <updated>2008-06-08T23:48:19-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Computing" />
    <category term="Discovery" />
    <category term="Humor" />
    <category term="Mac OS X" />
    <category term="Macintosh" />
    <category term="Software" />
    <category term="LaunchBar" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>If you <a class="freelinking external" href="http://twitter.com/rentzsch/statuses/827732597">can&rsquo;t remember the specific name of an application, but you often think of it by another name</a>, you can change how it is referred to in your LaunchBar configuration.<br />
I used to do something like this with Microsoft Excel; I&rsquo;d change its name in the LaunchBar configuration to &ldquo;XL.&rdquo; You could also <a class="freelinking external" href="http://twitter.com/jaharmi/statuses/827835038">refer &ldquo;Lineform&rdquo; as &ldquo;Illustrator&rdquo;</a> without changing the application&rsquo;s name in the Finder.<br />
To make the change, open LaunchBar. If you can remember the application, perform a search for it. When it is selected in the LaunchBar bar, choose Configuration &gt; Reveal in Configuration. Enter a new name for the selected app in the &ldquo;Name&rdquo; column in the window that appears.<br />
I&rsquo;m not aware, however, of a way to have an application to respond to <em>two or more names</em> in LaunchBar. There may be a way; I just don&rsquo;t know it.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>If you <a class="freelinking external" href="http://twitter.com/rentzsch/statuses/827732597">can&rsquo;t remember the specific name of an application, but you often think of it by another name</a>, you can change how it is referred to in your LaunchBar configuration.</p>
<p>I used to do something like this with Microsoft Excel; I&rsquo;d change its name in the LaunchBar configuration to &ldquo;XL.&rdquo; You could also <a class="freelinking external" href="http://twitter.com/jaharmi/statuses/827835038">refer &ldquo;Lineform&rdquo; as &ldquo;Illustrator&rdquo;</a> without changing the application&rsquo;s name in the Finder.</p>
<p>To make the change, open LaunchBar. If you can remember the application, perform a search for it. When it is selected in the LaunchBar bar, choose Configuration &gt; Reveal in Configuration. Enter a new name for the selected app in the &ldquo;Name&rdquo; column in the window that appears.</p>
<p>I&rsquo;m not aware, however, of a way to have an application to respond to <em>two or more names</em> in LaunchBar. There may be a way; I just don&rsquo;t know it.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Hunting Snow Leopard</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/06/05/hunting_snow_leopard" />
    <id>http://www.jaharmi.com/2008/06/05/hunting_snow_leopard</id>
    <published>2008-06-05T06:59:19-04:00</published>
    <updated>2008-06-05T06:59:24-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Apple" />
    <category term="Computing" />
    <category term="Mac OS X" />
    <category term="Macintosh" />
    <category term="Software" />
    <category term="Web" />
    <category term="Leopard" />
    <category term="Rumor" />
    <category term="Entertainment" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>I&rsquo;ve been thinking for a few months that Mac OS X 10.6 (or the like) would be introduced to developers at WWDC 2008. I&rsquo;ve said as much to those unfortunate enough to be within earshot. I haven&rsquo;t mentioned it here &#8230; and in recent days I&rsquo;ve felt less confident about this gut feeling based on the public WWDC session schedule.<br />
If Apple was trying to return to an 18-month release cycle for Mac OS X, my thought process went (after the CEO announced just such a push), a developer preview would almost <em>have</em> to be shown at this WWDC. That has lingered in the back of my mind. It also provided a reason to go to the conference if you were interested more in the Mac track than the iPhone.<br />
Now there are rumors flying around, based on various strings in Apple software and from other sources, that there <em>will</em> be a preview release of Mac OS X 10.6 at WWDC. And it&rsquo;s being referred to with the moniker, &ldquo;Snow Leopard.&rdquo;<br />
If, as these rumors say, the upgrade will focus on reliability and security, then the general lack of room for schedules on it is more plausible. The name distinguishes it little from Leopard, but maybe just enough.<br />
However, unless this release were more like the free-with-$20 shipping Mac OS X 10.1 update, who would buy it? Would Apple charge $129 retail for stability and security? It seems that there would have to be more.<br />
I can definitely see that security <em>could</em> be enhanced by greater adoption of certain features &mdash; some reasonable candidates for further enhancement since Leopard &mdash; which are the focus of several sessions at WWDC, according to the published schedule.<br />
Since I&rsquo;m always watching for when old rumors swing back around, I&rsquo;d guess that one additional change we could see is the mythical &ldquo;Illuminous&rdquo; user interface. (Assuming, of course, that this is not the unified interface style we already have in Leopard.) It usually takes two years for fun old rumors to become reality, if they ever do &mdash; that&rsquo;s enough time for many to have forgotten about them and for actual development work to have taken place. A new interface with a new name would jack up the value of a new OS in some people&rsquo;s minds. Moreso if it actually works better than the old one.<br />
If the lack of PowerPC support were true, then this would be an astounding announcement. It would cut off upgrades for a large (but ever-decreasing) percentage of the Mac population. Already, Leopard itself was limited to G5s and the newest G4s. This could have an interesting effect on those institutional customers who bought G5s for their compute power. Let&#8217;s recall that although the Intel Macs have been out since January 2006 and the transition was relatively quick, the high end Power Mac and Xserve systems were the last to be replaced. For a while yet, there can still be Apple PowerPC-based systems that are less than three years old.<br />
Ah, we&rsquo;ll see what happens Monday. You never know with rumors. I have no inside information and even I wouldn&rsquo;t make any important decisions based on these musings.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I&rsquo;ve been thinking for a few months that Mac OS X 10.6 (or the like) would be introduced to developers at WWDC 2008. I&rsquo;ve said as much to those unfortunate enough to be within earshot. I haven&rsquo;t mentioned it here &#8230; and in recent days I&rsquo;ve felt less confident about this gut feeling based on the public WWDC session schedule.</p>
<p>If Apple was trying to return to an 18-month release cycle for Mac OS X, my thought process went (after the CEO announced just such a push), a developer preview would almost <em>have</em> to be shown at this WWDC. That has lingered in the back of my mind. It also provided a reason to go to the conference if you were interested more in the Mac track than the iPhone.</p>
<p>Now there are rumors flying around, based on various strings in Apple software and from other sources, that there <em>will</em> be a preview release of Mac OS X 10.6 at WWDC. And it&rsquo;s being referred to with the moniker, &ldquo;Snow Leopard.&rdquo;</p>
<p>If, as these rumors say, the upgrade will focus on reliability and security, then the general lack of room for schedules on it is more plausible. The name distinguishes it little from Leopard, but maybe just enough.</p>
<p>However, unless this release were more like the free-with-$20 shipping Mac OS X 10.1 update, who would buy it? Would Apple charge $129 retail for stability and security? It seems that there would have to be more.</p>
<p>I can definitely see that security <em>could</em> be enhanced by greater adoption of certain features &mdash; some reasonable candidates for further enhancement since Leopard &mdash; which are the focus of several sessions at WWDC, according to the published schedule.</p>
<p>Since I&rsquo;m always watching for when old rumors swing back around, I&rsquo;d guess that one additional change we could see is the mythical &ldquo;Illuminous&rdquo; user interface. (Assuming, of course, that this is not the unified interface style we already have in Leopard.) It usually takes two years for fun old rumors to become reality, if they ever do &mdash; that&rsquo;s enough time for many to have forgotten about them and for actual development work to have taken place. A new interface with a new name would jack up the value of a new OS in some people&rsquo;s minds. Moreso if it actually works better than the old one.</p>
<p>If the lack of PowerPC support were true, then this would be an astounding announcement. It would cut off upgrades for a large (but ever-decreasing) percentage of the Mac population. Already, Leopard itself was limited to G5s and the newest G4s. This could have an interesting effect on those institutional customers who bought G5s for their compute power. Let&#8217;s recall that although the Intel Macs have been out since January 2006 and the transition was relatively quick, the high end Power Mac and Xserve systems were the last to be replaced. For a while yet, there can still be Apple PowerPC-based systems that are less than three years old.</p>
<p>Ah, we&rsquo;ll see what happens Monday. You never know with rumors. I have no inside information and even I wouldn&rsquo;t make any important decisions based on these musings.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Limit Launchd LaunchAgents to specific session types in Leopard</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/29/limit_launchd_launchagents_to_specific_session_types_in_leopard" />
    <id>http://www.jaharmi.com/2008/05/29/limit_launchd_launchagents_to_specific_session_types_in_leopard</id>
    <published>2008-05-29T18:28:17-04:00</published>
    <updated>2008-05-29T18:28:20-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Apple" />
    <category term="Computing" />
    <category term="Discovery" />
    <category term="Exploration" />
    <category term="Mac OS X" />
    <category term="Open source" />
    <category term="Scripting" />
    <category term="Software" />
    <category term="System administration" />
    <category term="Leopard" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>In Leopard, launchd has some options that can tailor your now-working LaunchAgents for specific circumstances. For example, if you want your LaunchAgent to run <em>only</em> when a user has logged in at the Aqua console &mdash; rather than SSH or other login sessions &mdash; you can use the &ldquo;LimitLoadToSessionType&rdquo; key:<br />
<code>&lt;key&gt;LimitLoadToSessionType&lt;/key&gt;<br />
&lt;string&gt;Aqua&lt;/string&gt;</code><br />
Note that to find events that have been limited in this way, you must use launchctl&rsquo;s &ldquo;-S&rdquo; flag to specify the session type. Otherwise, <a class="freelinking external" href="http://lists.macosforge.org/pipermail/launchd-dev/2008-March/000234.html">launchctl won&rsquo;t find jobs that are specified for a different kind of session than the current one</a>, as per Levi Brown&rsquo;s post.<br />
I also found the &ldquo;LimitLoadToHosts&rdquo; and &ldquo;LimitLoadFromHosts&rdquo; keys when looking this topic up in the launchd.plist man page.<br />
Thanks to James Bucanek for <a class="freelinking external" href="http://lists.macosforge.org/pipermail/launchd-dev/2008-March/000245.html">mentioning this on the launchd-dev list</a>.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In Leopard, launchd has some options that can tailor your now-working LaunchAgents for specific circumstances. For example, if you want your LaunchAgent to run <em>only</em> when a user has logged in at the Aqua console &mdash; rather than SSH or other login sessions &mdash; you can use the &ldquo;LimitLoadToSessionType&rdquo; key:</p>
<p><code>&lt;key&gt;LimitLoadToSessionType&lt;/key&gt;<br />
&lt;string&gt;Aqua&lt;/string&gt;</code></p>
<p>Note that to find events that have been limited in this way, you must use launchctl&rsquo;s &ldquo;-S&rdquo; flag to specify the session type. Otherwise, <a class="freelinking external" href="http://lists.macosforge.org/pipermail/launchd-dev/2008-March/000234.html">launchctl won&rsquo;t find jobs that are specified for a different kind of session than the current one</a>, as per Levi Brown&rsquo;s post.</p>
<p>I also found the &ldquo;LimitLoadToHosts&rdquo; and &ldquo;LimitLoadFromHosts&rdquo; keys when looking this topic up in the launchd.plist man page.</p>
<p>Thanks to James Bucanek for <a class="freelinking external" href="http://lists.macosforge.org/pipermail/launchd-dev/2008-March/000245.html">mentioning this on the launchd-dev list</a>.</p>
    ]]></content>
  </entry>
  <entry>
    <title>WWDC 2008 iMix on iTunes Store</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/29/wwdc_2008_imix_on_itunes_store" />
    <id>http://www.jaharmi.com/2008/05/29/wwdc_2008_imix_on_itunes_store</id>
    <published>2008-05-29T06:12:53-04:00</published>
    <updated>2008-06-11T02:03:47-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Apple" />
    <category term="Music" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>It&rsquo;s that time of year again. My WWDC 2008 iMix has been posted.</p>
<p>It started as a gag but I&rsquo;ve had occasional encouragement from others who thought it was a good idea. Plus, I generally like the music at the conference so it&rsquo;s nice to save some record of it. It&rsquo;s hard to find iMixes because you have to go into the iMix section of the store to search for them, so I wanted to help myself by linking to it here.</p>
<p>If you&rsquo;re at the conference, feel free to send me submissions; information is in the iMix description itself.</p>
<div style="position:relative;"><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=282761548&amp;s=143441&amp;v0=575" target="_self"><img src="http://ax.phobos.apple.com.edgesuite.net/images/spacer.gif" border="0" width="60" height="60" style="position:absolute; top:30px; left:12px;"/></a><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=282761548&amp;s=143441&amp;v0=575" target="_self"><img src="http://ax.phobos.apple.com.edgesuite.net/images/spacer.gif" border="0" width="335" height="20" style="position:absolute; top:30px; left:75px;"/></a><a href="itms://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/publishedPlayListHelp?v0=575" target="_self"><img src="http://ax.phobos.apple.com.edgesuite.net/images/spacer.gif" border="0" width="175" height="20" style="position:absolute; top:295px; left:130px;"/></a><embed src="http://ax.phobos.apple.com.edgesuite.net/flash/feedreader.swf" FlashVars="feed=WebObjects/MZStoreServices.woa/ws/RSS/imix/html=false/imixid=282761548/sf=143441/xml?v0=575" quality="high" salign="lt" wmode="transparent" width="435" height="330" name="feedreader" align="top" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></div>
<p><strong>Update:</strong> I had to replace the earlier iMix with a new version so I could add to it. It appears that if you create an iMix on one computer, you can't update it on another.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>It&rsquo;s that time of year again. My WWDC 2008 iMix has been posted.</p>
<p>It started as a gag but I&rsquo;ve had occasional encouragement from others who thought it was a good idea. Plus, I generally like the music at the conference so it&rsquo;s nice to save some record of it. It&rsquo;s hard to find iMixes because you have to go into the iMix section of the store to search for them, so I wanted to help myself by linking to it here.</p>
<p>If you&rsquo;re at the conference, feel free to send me submissions; information is in the iMix description itself.</p>
<div style="position:relative;"><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=282761548&amp;s=143441&amp;v0=575" target="_self"><img src="http://ax.phobos.apple.com.edgesuite.net/images/spacer.gif" border="0" width="60" height="60" style="position:absolute; top:30px; left:12px;"/></a><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewIMix?id=282761548&amp;s=143441&amp;v0=575" target="_self"><img src="http://ax.phobos.apple.com.edgesuite.net/images/spacer.gif" border="0" width="335" height="20" style="position:absolute; top:30px; left:75px;"/></a><a href="itms://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/publishedPlayListHelp?v0=575" target="_self"><img src="http://ax.phobos.apple.com.edgesuite.net/images/spacer.gif" border="0" width="175" height="20" style="position:absolute; top:295px; left:130px;"/></a><embed src="http://ax.phobos.apple.com.edgesuite.net/flash/feedreader.swf" FlashVars="feed=WebObjects/MZStoreServices.woa/ws/RSS/imix/html=false/imixid=282761548/sf=143441/xml?v0=575" quality="high" salign="lt" wmode="transparent" width="435" height="330" name="feedreader" align="top" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></div>
<p><strong>Update:</strong> I had to replace the earlier iMix with a new version so I could add to it. It appears that if you create an iMix on one computer, you can't update it on another.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Python to remove commands module and some Mac-specific modules</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/28/python_to_remove_commands_module_and_some_mac_specific_modules" />
    <id>http://www.jaharmi.com/2008/05/28/python_to_remove_commands_module_and_some_mac_specific_modules</id>
    <published>2008-05-28T21:46:43-04:00</published>
    <updated>2008-05-28T21:46:45-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Tiger" />
    <category term="Computing" />
    <category term="Discovery" />
    <category term="Linux" />
    <category term="Mac OS X" />
    <category term="Macintosh" />
    <category term="Open source" />
    <category term="Python" />
    <category term="Scripting" />
    <category term="Shell" />
    <category term="Software" />
    <category term="System administration" />
    <category term="UNIX" />
    <category term="Leopard" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>Drat! I&rsquo;ve learned that the <code>commands</code> module for Python, which I use, <a class="freelinking external" href="http://python.org/dev/peps/pep-3108/">is deprecated and removed in Python according to PEP 3108</a>. That means I can no longer safely call <code>commands.getstatusoutput()</code> anymore. I&rsquo;ve frequently used this call in the past because it seemed the sanest, easiest way to call for a shell utility and get both its output and return status (for success or error).<br />
I&rsquo;ll have to find some other way to perform the same function &mdash; preferably one that will work on Python 2.3 from Mac OS X Tiger, Python 2.5.1 from Leopard, and future Pythons. The stated replacement for a number of similar modules (including <code>popen2</code>, which frankly kind-of frightened me off with its name) is the <a class="freelinking external" href="http://www.python.org/dev/peps/pep-0324/">subprocess module from PEP 324</a>, but I don&rsquo;t know if that will work for my purposes.<br />
There are also a bunch of Mac-specific modules being removed. I don&rsquo;t use any of them right now, but that doesn&rsquo;t mean they wouldn&rsquo;t have been useful.<br />
This kind of thing is spirit-crushing to me for some reason. I&rsquo;m especially annoyed that Python has been around for so long and it is <em>still</em> reorganizing the ways it calls <em>shell commands</em>. Just settle on something! It seems hard to take it seriously as a system administration scripting language when things like this happen.<br />
On the other hand, I love so much of the Python Standard Library, which has afforded me a lot for system administration &#8230;</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Drat! I&rsquo;ve learned that the <code>commands</code> module for Python, which I use, <a class="freelinking external" href="http://python.org/dev/peps/pep-3108/">is deprecated and removed in Python according to PEP 3108</a>. That means I can no longer safely call <code>commands.getstatusoutput()</code> anymore. I&rsquo;ve frequently used this call in the past because it seemed the sanest, easiest way to call for a shell utility and get both its output and return status (for success or error).</p>
<p>I&rsquo;ll have to find some other way to perform the same function &mdash; preferably one that will work on Python 2.3 from Mac OS X Tiger, Python 2.5.1 from Leopard, and future Pythons. The stated replacement for a number of similar modules (including <code>popen2</code>, which frankly kind-of frightened me off with its name) is the <a class="freelinking external" href="http://www.python.org/dev/peps/pep-0324/">subprocess module from PEP 324</a>, but I don&rsquo;t know if that will work for my purposes.</p>
<p>There are also a bunch of Mac-specific modules being removed. I don&rsquo;t use any of them right now, but that doesn&rsquo;t mean they wouldn&rsquo;t have been useful.</p>
<p>This kind of thing is spirit-crushing to me for some reason. I&rsquo;m especially annoyed that Python has been around for so long and it is <em>still</em> reorganizing the ways it calls <em>shell commands</em>. Just settle on something! It seems hard to take it seriously as a system administration scripting language when things like this happen.</p>
<p>On the other hand, I love so much of the Python Standard Library, which has afforded me a lot for system administration &#8230;</p>
    ]]></content>
  </entry>
  <entry>
    <title>Radmind server logging and the repo command</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/28/radmind_server_logging_and_the_repo_command" />
    <id>http://www.jaharmi.com/2008/05/28/radmind_server_logging_and_the_repo_command</id>
    <published>2008-05-28T21:13:35-04:00</published>
    <updated>2008-05-28T21:20:06-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Tiger" />
    <category term="Computing" />
    <category term="Exploration" />
    <category term="Linux" />
    <category term="Mac OS X" />
    <category term="Open source" />
    <category term="Python" />
    <category term="Radmind" />
    <category term="Shell" />
    <category term="Software" />
    <category term="System administration" />
    <category term="UNIX" />
    <category term="Leopard" />
    <category term="Logging" />
    <category term="Privacy" />
    <category term="Security" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>Under normal circumstances, the latest Radmind tools that communicate with the server report client status updates in the Radmind server&rsquo;s system log. These standard messages can include ones like:<br />
<code>May  8 03:14:56 RadmindServerHost radmind[7890]: report radmind-client.example.com 192.168.7.42 - - ktcheck No updates needed<br />
May 15 03:15:25 RadmindServerHost radmind[24531]: report radmind-client.example.com 192.168.7.42 - - ktcheck Updates retrieved<br />
May 15 03:21:48 RadmindServerHost radmind[24534]: report radmind-client.example.com 192.168.7.42 - - lapply Changes applied successfully<br />
May 15 03:31:07 RadmindServerHost radmind[24356]: report radmind-client.example.com 192.168.7.42 CertificateCN - lapply Error, changes made</code><br />
The Radmind <code>repo</code>, or &ldquo;report,&rdquo; tool provides the ability to send arbitrary messages to the Radmind server process. But how are these messages formatted and sent?<br />
<code>$ <strong>repo -e "Debug" -h radmindserverhost.example.com -w2 "Test message"</strong></code><br />
&#8230; results in the system log message:<br />
<code>May 15 03:31:56 RadmindServerHost radmind[25236]: report radmind-client.example.com 192.168.7.42 CertificateCN - Debug Test message</code><br />
Here, we can see that an entry created with <code>repo</code> looks like the standard Radmind log messages above. The client <em>hostname</em> and <em>IP address</em> are reported after the &ldquo;report&rdquo; text. The <em>CertificateCN</em> for the client &mdash; if the highest authorization level is specified (with the -w2 flag) &mdash; is also listed; if not, a dash takes its place. I haven&rsquo;t seen a case where the second dash is substituted, however.<br />
Finally, where the Radmind command/tool used would normally be, the &ldquo;event&rdquo; specified by <code>repo</code> will printed. After that, the message text appears.<br />
The value proposition is that if you&rsquo;re using Radmind, the <code>repo</code> command can help you send arbitrary messages to the server for logging. As bonus, if you&#8217;ve taken the time and effort to build the certificate infrastructure for Radmind, you can send these messages securely between the clients and the server cloaked in SSL.<br />
If you&rsquo;re using multiple servers, you may want to combine their logs in one location so that you can get all of the clients&rsquo; reports in one location. You may also want or need to retain these reports for more time. In either case, determine what policies you should apply to the syslog or Apple System Logger (ASL, for Mac OS X) configuration for your server systems.<br />
Whether or not you use <code>repo</code>, it&rsquo;s good to know that the tools do some logging. The logging can be followed to try to determine the status of your clients, or whether they are failing their updates.<br />
Unfortunately, the most common client failures I have seen tend to involve the <code>lapply</code> tool, and the default level of detail I&rsquo;ve seen reported back to the server does <em>not</em> provide an indication of what problem has been encountered. You see only that there <em>was</em> an error. Still, even though you may not get enough detail to remotely resolve the problem, it&rsquo;s something for you to go by <em>find</em> problems in the first place.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Under normal circumstances, the latest Radmind tools that communicate with the server report client status updates in the Radmind server&rsquo;s system log. These standard messages can include ones like:</p>
<p><code>May  8 03:14:56 RadmindServerHost radmind[7890]: report radmind-client.example.com 192.168.7.42 - - ktcheck No updates needed<br />
May 15 03:15:25 RadmindServerHost radmind[24531]: report radmind-client.example.com 192.168.7.42 - - ktcheck Updates retrieved<br />
May 15 03:21:48 RadmindServerHost radmind[24534]: report radmind-client.example.com 192.168.7.42 - - lapply Changes applied successfully<br />
May 15 03:31:07 RadmindServerHost radmind[24356]: report radmind-client.example.com 192.168.7.42 CertificateCN - lapply Error, changes made</code></p>
<p>The Radmind <code>repo</code>, or &ldquo;report,&rdquo; tool provides the ability to send arbitrary messages to the Radmind server process. But how are these messages formatted and sent?</p>
<p><code>$ <strong>repo -e "Debug" -h radmindserverhost.example.com -w2 "Test message"</strong></code></p>
<p>&#8230; results in the system log message:</p>
<p><code>May 15 03:31:56 RadmindServerHost radmind[25236]: report radmind-client.example.com 192.168.7.42 CertificateCN - Debug Test message</code></p>
<p>Here, we can see that an entry created with <code>repo</code> looks like the standard Radmind log messages above. The client <em>hostname</em> and <em>IP address</em> are reported after the &ldquo;report&rdquo; text. The <em>CertificateCN</em> for the client &mdash; if the highest authorization level is specified (with the -w2 flag) &mdash; is also listed; if not, a dash takes its place. I haven&rsquo;t seen a case where the second dash is substituted, however.</p>
<p>Finally, where the Radmind command/tool used would normally be, the &ldquo;event&rdquo; specified by <code>repo</code> will printed. After that, the message text appears.</p>
<p>The value proposition is that if you&rsquo;re using Radmind, the <code>repo</code> command can help you send arbitrary messages to the server for logging. As bonus, if you&#8217;ve taken the time and effort to build the certificate infrastructure for Radmind, you can send these messages securely between the clients and the server cloaked in SSL.</p>
<p>If you&rsquo;re using multiple servers, you may want to combine their logs in one location so that you can get all of the clients&rsquo; reports in one location. You may also want or need to retain these reports for more time. In either case, determine what policies you should apply to the syslog or Apple System Logger (ASL, for Mac OS X) configuration for your server systems.</p>
<p>Whether or not you use <code>repo</code>, it&rsquo;s good to know that the tools do some logging. The logging can be followed to try to determine the status of your clients, or whether they are failing their updates.</p>
<p>Unfortunately, the most common client failures I have seen tend to involve the <code>lapply</code> tool, and the default level of detail I&rsquo;ve seen reported back to the server does <em>not</em> provide an indication of what problem has been encountered. You see only that there <em>was</em> an error. Still, even though you may not get enough detail to remotely resolve the problem, it&rsquo;s something for you to go by <em>find</em> problems in the first place.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Format numbers with the Python locale module</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/26/format_numbers_with_the_python_locale_module" />
    <id>http://www.jaharmi.com/2008/05/26/format_numbers_with_the_python_locale_module</id>
    <published>2008-05-26T23:00:09-04:00</published>
    <updated>2008-05-27T15:20:23-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Apple" />
    <category term="Computing" />
    <category term="Discovery" />
    <category term="Exploration" />
    <category term="Mac OS X" />
    <category term="Open source" />
    <category term="Python" />
    <category term="Scripting" />
    <category term="Software" />
    <category term="System administration" />
    <category term="Leopard" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>I&rsquo;m constantly astounded by the breadth of features available in the Python Standard Library. Although the functions I find there are not always easy to grasp, it is almost always worth searching around a bit for a function or method in the standard library before I write my own code to do something someone else has probably had to do before.<br />
Take the &ldquo;locale&rdquo; module. It lets you format certain kinds of data based on your locale and its customs. Numbers (including currency) happen to be one of its specialties. Since I had a need to output long numbers whose digits were grouped with commas &mdash; which makes them easier to read &mdash; and <code>locale.format()</code> does just that. Even better, it&rsquo;s internationalized and formats them for your system&rsquo;s own locale.<br />
<code>&gt;&gt;&gt; <strong>import locale</strong><br />
&gt;&gt;&gt; <strong>a = {'size': 123456789, 'unit': 'bytes'}</strong><br />
&gt;&gt;&gt; <strong>print(locale.format("%(size).2f", a, 1))</strong><br />
123456789.00<br />
&gt;&gt;&gt; <strong>locale.setlocale(locale.LC_ALL, '')</strong> <em># Set the locale for your system</em><br />
'en_US.UTF-8'<br />
&gt;&gt;&gt; <strong>print(locale.format("%(size).2f", a, 1))</strong><br />
123,456,789.00</code><br />
In trying to use it in the bundled Python 2.5.1 on Mac OS X Leopard, I noticed that the default for scripts and the interpreter doesn&rsquo;t format numbers as I expected for my locale. I found that I needed to <em>set</em> a locale to get the expected formatting. To do this, I run <code>locale.setlocale()</code>, as above. I&rsquo;m not sure if this is required for other Python installations, but it&rsquo;s worth mentioning.<br />
One difficulty I created for myself was when I tried mixing more into my format string. For example, <code>locale.format()</code> would fail to reformat a number when I added in the string for the unit from my original dictionary:<br />
<code>&gt;&gt;&gt; <strong>print(locale.format("%(size).2f %(unit)s", a, 1))</strong><br />
123456789.00 bytes</code><br />
In retrospect, this makes total sense, but it took <a class="freelinking external" href="http://www.facebook.com/profile.php?id=780088555&amp;hiq=chast%2Cmark">Mark</a> looking over my code to discover my error.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I&rsquo;m constantly astounded by the breadth of features available in the Python Standard Library. Although the functions I find there are not always easy to grasp, it is almost always worth searching around a bit for a function or method in the standard library before I write my own code to do something someone else has probably had to do before.</p>
<p>Take the &ldquo;locale&rdquo; module. It lets you format certain kinds of data based on your locale and its customs. Numbers (including currency) happen to be one of its specialties. Since I had a need to output long numbers whose digits were grouped with commas &mdash; which makes them easier to read &mdash; and <code>locale.format()</code> does just that. Even better, it&rsquo;s internationalized and formats them for your system&rsquo;s own locale.</p>
<p><code>&gt;&gt;&gt; <strong>import locale</strong><br />
&gt;&gt;&gt; <strong>a = {'size': 123456789, 'unit': 'bytes'}</strong><br />
&gt;&gt;&gt; <strong>print(locale.format("%(size).2f", a, 1))</strong><br />
123456789.00<br />
&gt;&gt;&gt; <strong>locale.setlocale(locale.LC_ALL, '')</strong> <em># Set the locale for your system</em><br />
'en_US.UTF-8'<br />
&gt;&gt;&gt; <strong>print(locale.format("%(size).2f", a, 1))</strong><br />
123,456,789.00</code></p>
<p>In trying to use it in the bundled Python 2.5.1 on Mac OS X Leopard, I noticed that the default for scripts and the interpreter doesn&rsquo;t format numbers as I expected for my locale. I found that I needed to <em>set</em> a locale to get the expected formatting. To do this, I run <code>locale.setlocale()</code>, as above. I&rsquo;m not sure if this is required for other Python installations, but it&rsquo;s worth mentioning.</p>
<p>One difficulty I created for myself was when I tried mixing more into my format string. For example, <code>locale.format()</code> would fail to reformat a number when I added in the string for the unit from my original dictionary:</p>
<p><code>&gt;&gt;&gt; <strong>print(locale.format("%(size).2f %(unit)s", a, 1))</strong><br />
123456789.00 bytes</code></p>
<p>In retrospect, this makes total sense, but it took <a class="freelinking external" href="http://www.facebook.com/profile.php?id=780088555&amp;hiq=chast%2Cmark">Mark</a> looking over my code to discover my error.</p>
    ]]></content>
  </entry>
  <entry>
    <title>When I ruled the world?</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/24/when_i_ruled_the_world" />
    <id>http://www.jaharmi.com/2008/05/24/when_i_ruled_the_world</id>
    <published>2008-05-24T07:59:13-04:00</published>
    <updated>2008-05-24T07:59:17-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Apple" />
    <category term="Devices" />
    <category term="Humor" />
    <category term="iPod" />
    <category term="Music" />
    <category term="Video" />
    <category term="Web" />
    <category term="Entertainment" />
    <category term="Suppliers" />
    <category term="Technology" />
    <category term="World" />
    <summary type="html"><![CDATA[<p>Does anyone else think that Apple has some ulterior motive for promoting <em>Viva la Vida</em>, the track on the new <a class="freelinking external" href="http://movies.apple.com/movies/us/apple/ipoditunes/2008/ads/apple_ipoditunes_sonic_20080520_848x480.mov">iTunes ad featuring Coldplay</a>? That maybe its lyrics are indicative of something going on at Apple?<br />
&ldquo;When I ruled the world,&rdquo; indeed.<br />
No matter. I find it a fantastic visual treat and now the haunting music is stuck in my head. I would not be surprised if it were featured at WWDC 2008 in a few weeks.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>Does anyone else think that Apple has some ulterior motive for promoting <em>Viva la Vida</em>, the track on the new <a class="freelinking external" href="http://movies.apple.com/movies/us/apple/ipoditunes/2008/ads/apple_ipoditunes_sonic_20080520_848x480.mov">iTunes ad featuring Coldplay</a>? That maybe its lyrics are indicative of something going on at Apple?</p>
<p>&ldquo;When I ruled the world,&rdquo; indeed.</p>
<p>No matter. I find it a fantastic visual treat and now the haunting music is stuck in my head. I would not be surprised if it were featured at WWDC 2008 in a few weeks.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Python string method for title case, versus the Daring Fireball script</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/20/python_string_method_for_title_case_versus_the_daring_fireball_script" />
    <id>http://www.jaharmi.com/2008/05/20/python_string_method_for_title_case_versus_the_daring_fireball_script</id>
    <published>2008-05-20T16:55:31-04:00</published>
    <updated>2008-05-20T16:55:36-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Computing" />
    <category term="Humor" />
    <category term="Open source" />
    <category term="Perl" />
    <category term="Python" />
    <category term="Scripting" />
    <category term="Shell" />
    <category term="Software" />
    <category term="Leopard" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>I ran a quick test of the Python &ldquo;title&rdquo; string method (from Python 2.5.1 in Leopard); it fails the tests on the edge cases mentioned in the <a class="freelinking external" href="http://daringfireball.net/2008/05/title_case">Title Case</a> post at Daring Fireball. It really only uppercases the first letter of every word and lowercases everything else.<br />
Not much better than looping through a string with ucfirst() in Perl, except you don&#8217;t have to do the looping yourself.<br />
Drat. I was expecting better.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>I ran a quick test of the Python &ldquo;title&rdquo; string method (from Python 2.5.1 in Leopard); it fails the tests on the edge cases mentioned in the <a class="freelinking external" href="http://daringfireball.net/2008/05/title_case">Title Case</a> post at Daring Fireball. It really only uppercases the first letter of every word and lowercases everything else.</p>
<p>Not much better than looping through a string with ucfirst() in Perl, except you don&#8217;t have to do the looping yourself.</p>
<p>Drat. I was expecting better.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Get Python installation information from Distutils</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/20/get_python_installation_information_from_distutils" />
    <id>http://www.jaharmi.com/2008/05/20/get_python_installation_information_from_distutils</id>
    <published>2008-05-20T10:07:04-04:00</published>
    <updated>2008-05-20T10:21:35-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Computing" />
    <category term="Discovery" />
    <category term="Linux" />
    <category term="Mac OS X" />
    <category term="Open source" />
    <category term="Python" />
    <category term="Scripting" />
    <category term="Software" />
    <category term="System administration" />
    <category term="UNIX" />
    <category term="Leopard" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>The Distutils Python module includes functions to obtain information about the Python installation. This may be useful for system administrators, and it certainly caught my eye when I read about it.<br />
The results below are from Apple&rsquo;s bundled build of Python 2.5.1 in Mac OS X Leopard. Credit for the comments describing each function comes from the <a class="freelinking external" href="http://docs.python.org/dist/module-distutils.sysconfig.html">distutils.sysconfig documentation</a>.<br />
<code>&gt;&gt;&gt; <strong>import distutils.sysconfig</strong><br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_version()</strong> <em># Get the major Python version without patchlevel</em><br />
'2.5'<br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_lib(standard_lib=True)</strong> <em># Return the directory containing the Python library; if 'standard_lib' is true, return the directory containing standard Python library modules</em><br />
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5'<br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_lib()</strong> <em># Otherwise, return the directory for site-specific modules</em><br />
'/Library/Python/2.5/site-packages'<br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_lib(plat_specific=True)</strong> <em># Return any platform-specific modules from a non-pure-Python module distribution</em><br />
'/Library/Python/2.5/site-packages'</code><br />
You&rsquo;d install your own modules for system-wide use in the directory returned by <code>distutils.sysconfig.get_python_lib()</code>.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>The Distutils Python module includes functions to obtain information about the Python installation. This may be useful for system administrators, and it certainly caught my eye when I read about it.</p>
<p>The results below are from Apple&rsquo;s bundled build of Python 2.5.1 in Mac OS X Leopard. Credit for the comments describing each function comes from the <a class="freelinking external" href="http://docs.python.org/dist/module-distutils.sysconfig.html">distutils.sysconfig documentation</a>.</p>
<p><code>&gt;&gt;&gt; <strong>import distutils.sysconfig</strong><br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_version()</strong> <em># Get the major Python version without patchlevel</em><br />
'2.5'<br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_lib(standard_lib=True)</strong> <em># Return the directory containing the Python library; if 'standard_lib' is true, return the directory containing standard Python library modules</em><br />
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5'<br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_lib()</strong> <em># Otherwise, return the directory for site-specific modules</em><br />
'/Library/Python/2.5/site-packages'<br />
&gt;&gt;&gt; <strong>distutils.sysconfig.get_python_lib(plat_specific=True)</strong> <em># Return any platform-specific modules from a non-pure-Python module distribution</em><br />
'/Library/Python/2.5/site-packages'</code></p>
<p>You&rsquo;d install your own modules for system-wide use in the directory returned by <code>distutils.sysconfig.get_python_lib()</code>.</p>
    ]]></content>
  </entry>
  <entry>
    <title>Determine if a string starts with one of a tuple of strings in Python</title>
    <link rel="alternate" type="text/html" href="http://www.jaharmi.com/2008/05/20/determine_if_a_string_starts_with_one_of_a_tuple_of_strings_in_python" />
    <id>http://www.jaharmi.com/2008/05/20/determine_if_a_string_starts_with_one_of_a_tuple_of_strings_in_python</id>
    <published>2008-05-20T08:47:06-04:00</published>
    <updated>2008-05-20T10:18:08-04:00</updated>
    <author>
      <name>Jaharmi</name>
    </author>
    <category term="Learning" />
    <category term="Computing" />
    <category term="Exploration" />
    <category term="Mac OS X" />
    <category term="Open source" />
    <category term="Python" />
    <category term="Scripting" />
    <category term="Software" />
    <category term="Suppliers" />
    <category term="Technology" />
    <summary type="html"><![CDATA[<p>In Python, there is a built-in string method, &ldquo;startswith,&rdquo; that lets you determine whether a line starts with a character. I&rsquo;ve used it before because I tend to want to use the features of the standard library, despite having awesome features like slicing at my disposal. What I didn&rsquo;t realize immediately, though, was how to compare the string against two or more sets of characters. All I knew is that entering a <em>list</em> as the prefix &mdash; instead of the more common <em>single string</em> &mdash; didn&rsquo;t work.<br />
Luckily, my question was answered right away in the <a class="freelinking external" href="http://docs.python.org/lib/string-methods.html">string method documentation</a>. I found that to perform these comparisons together, you must supply the &ldquo;startswith&rdquo; string method with a tuple. It works the same for the &ldquo;endswith&rdquo; method. However, this does require Python 2.5.<br />
<code>&gt;&gt;&gt; <strong>starts_with = ('f', 'a')</strong><br />
&gt;&gt;&gt; <strong>def does_startwith(selected_text):</strong><br />
... <strong>if selected_text.startswith(starts_with):</strong><br />
... <strong>print True</strong><br />
...<br />
&gt;&gt;&gt; <strong>does_startwith('z is a letter')</strong><br />
&gt;&gt;&gt; <strong>does_startwith('f is a letter')</strong><br />
True<br />
&gt;&gt;&gt; <strong>does_startwith('b is a letter')</strong><br />
&gt;&gt;&gt; <strong>does_startwith('a is a letter')</strong><br />
True</code><br />
This has some application to a larger question I had, so I wanted to note it.</p>
    ]]></summary>
    <content type="html"><![CDATA[<p>In Python, there is a built-in string method, &ldquo;startswith,&rdquo; that lets you determine whether a line starts with a character. I&rsquo;ve used it before because I tend to want to use the features of the standard library, despite having awesome features like slicing at my disposal. What I didn&rsquo;t realize immediately, though, was how to compare the string against two or more sets of characters. All I knew is that entering a <em>list</em> as the prefix &mdash; instead of the more common <em>single string</em> &mdash; didn&rsquo;t work.</p>
<p>Luckily, my question was answered right away in the <a class="freelinking external" href="http://docs.python.org/lib/string-methods.html">string method documentation</a>. I found that to perform these comparisons together, you must supply the &ldquo;startswith&rdquo; string method with a tuple. It works the same for the &ldquo;endswith&rdquo; method. However, this does require Python 2.5.</p>
<p><code>&gt;&gt;&gt; <strong>starts_with = ('f', 'a')</strong><br />
&gt;&gt;&gt; <strong>def does_startwith(selected_text):</strong><br />
... <strong>if selected_text.startswith(starts_with):</strong><br />
... <strong>print True</strong><br />
...<br />
&gt;&gt;&gt; <strong>does_startwith('z is a letter')</strong><br />
&gt;&gt;&gt; <strong>does_startwith('f is a letter')</strong><br />
True<br />
&gt;&gt;&gt; <strong>does_startwith('b is a letter')</strong><br />
&gt;&gt;&gt; <strong>does_startwith('a is a letter')</strong><br />
True</code></p>
<p>This has some application to a larger question I had, so I wanted to note it.</p>
    ]]></content>
  </entry>
</feed>
