<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>I Make Things - Linux</title>
    <link>http://blog.latcarf.com/</link>
    <description>The world is but a canvas to the imagination.</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    
    <image>
        <url>http://blog.latcarf.com/templates/bulletproof/img/s9y_banner_small.png</url>
        <title>RSS: I Make Things - Linux - The world is but a canvas to the imagination.</title>
        <link>http://blog.latcarf.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Fix for Tor on Leopard</title>
    <link>http://blog.latcarf.com/archives/136-Fix-for-Tor-on-Leopard.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/136-Fix-for-Tor-on-Leopard.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=136</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=136</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    After installing Mac OS X 10.5 (Leopard) fresh (I won&#039;t go into details &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;), I needed to reinstall &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=643&amp;amp;entry_id=136&quot; title=&quot;http://tor.eff.org&quot;  onmouseover=&quot;window.status=&#039;http://tor.eff.org&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Tor&lt;/a&gt;. I found the &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=644&amp;amp;entry_id=136&quot; title=&quot;http://www.torproject.org/dist/osx/Tor-0.1.2.18-tiger-universal-Bundle.dmg&quot;  onmouseover=&quot;window.status=&#039;http://www.torproject.org/dist/osx/Tor-0.1.2.18-tiger-universal-Bundle.dmg&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot;&gt;Tor expert installer&lt;/a&gt; didn&#039;t quite do what it was supposed to as far as creating the &lt;tt&gt;_tor&lt;/tt&gt; user the daemon runs as (the user ends up a little mangled - check it out after install with &lt;tt&gt;dscl . -read /Users/tor&lt;/tt&gt;) Since Leopard doesn&#039;t use NetInfo (&lt;tt&gt;niutil&lt;/tt&gt;) anymore, I had to manually create the user with DirectoryServices (&lt;tt&gt;dscl&lt;/tt&gt;). Here&#039;s the quick-and-dirty on what I did...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Create Tor Group and User:&lt;/span&gt;&lt;br /&gt;sudo dscl . -create /Groups/_tor&lt;br /&gt;sudo dscl . -create /Groups/_tor PrimaryGroupID &lt;span style=&quot;color: #cc66cc;&quot;&gt;100&lt;/span&gt;&lt;br /&gt;sudo dscl . -create /Groups/_tor RealName &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Tor Group&quot;&lt;/span&gt;&lt;br /&gt;sudo dscl . -create /Groups/_tor Password &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;sudo dscl . -create /Users/_tor&lt;br /&gt;sudo dscl . -create /Users/_tor UserShell /usr/bin/false&lt;br /&gt;sudo dscl . -create /Users/_tor RealName &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Tor Server&quot;&lt;/span&gt;&lt;br /&gt;sudo dscl . -create /Users/_tor UniqueID &lt;span style=&quot;color: #cc66cc;&quot;&gt;100&lt;/span&gt;&lt;br /&gt;sudo dscl . -create /Users/_tor PrimaryGroupID &lt;span style=&quot;color: #cc66cc;&quot;&gt;100&lt;/span&gt;&lt;br /&gt;sudo dscl . -create /Users/_tor NFSHomeDirectory /Library/Tor/var/lib/tor&lt;br /&gt;sudo dscl . -create /Users/_tor Password &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;*&#039;&lt;/span&gt;&lt;br /&gt;sudo dscl . -append /Groups/_tor GroupMembership _tor&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
After that, there was still a little more to do to get Tor to run. I needed to create a place for the logs and fix the StartupItems script. Here&#039;s what I did for that...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Create the logs directory&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; /var/log&lt;br /&gt;sudo mkdir tor&lt;br /&gt;sudo touch tor/tor.log&lt;br /&gt;sudo chown -R _tor:_tor tor&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Fix perms on the &amp;quot;home&amp;quot; directory&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; /Library/Tor/var/lib&lt;br /&gt;sudo chown -R _tor:_tor tor&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# In /Library/StartupItems/Tor/Tor change TORGROUP from TORGROUP=daemon to:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;TORGROUP=&lt;/span&gt;_tor&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Start the Tor server&lt;/span&gt;&lt;br /&gt;sudo /Library/StartupItems/Tor/Tor start&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Cool. That fixed it. &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/cool.png&quot; alt=&quot;8-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; Still not sure whether I want logging in &lt;tt&gt;/var/log/tor&lt;/tt&gt; or &lt;tt&gt;/Library/Tor/var/log/tor&lt;/tt&gt; though... Also, I guess I probably should submit all this to the Tor folks too. I&#039;m so damn lazy.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 03 Dec 2007 04:07:44 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/136-guid.html</guid>
    
</item>
<item>
    <title>TkCVS in Mac OS X X11</title>
    <link>http://blog.latcarf.com/archives/130-TkCVS-in-Mac-OS-X-X11.html</link>
            <category>Linux</category>
    
    <comments>http://blog.latcarf.com/archives/130-TkCVS-in-Mac-OS-X-X11.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=130</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=130</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    TkCVS (TkSVN) is one of the best tools I&#039;ve found for visualizing CVS and Subversion branches. Since it is written in Tcl/Tk you can use it on Mac, Linux, and that other OS.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to install it on Mac for use in the X11 environment and how to integrate it with BBEdit. This assumes you have the X11 environment and BBEdit command line tools (&lt;tt&gt;bbedit&lt;/tt&gt; and &lt;tt&gt;bbdiff&lt;/tt&gt;) installed. Also, you should have a &lt;tt&gt;/usr/local&lt;/tt&gt; directory and it has been added to your &lt;tt&gt;$PATH&lt;/tt&gt;. You&#039;ll have to find out how to do this on your own if you don&#039;t already know how.&lt;br /&gt;
&lt;br /&gt;
Download the &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=634&amp;amp;entry_id=130&quot;  onmouseover=&quot;window.status=&#039;http://www.twobarleycorns.net/tkcvs_8_0_4.tar.gz&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;TkCVS for Unix&quot;&gt;Unix distro&lt;/a&gt; (the latest was 8.0.4 as of this writing) to your Desktop.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Unpack the distro.&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;tar -xvzf tkcvs_8_0_4.tar.gz&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Install into &lt;tt&gt;/usr/local&lt;/tt&gt;&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;cd tkcvs_8_0_4&lt;br /&gt;
sudo ./doinstall.tcl -nox /usr/local&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Launch X11 and launch TkCVS from the &lt;tt&gt;xterm&lt;/tt&gt;. Or, better yet, customize the X11 &quot;Applications&quot; menu and add a command for &lt;tt&gt;tkcvs&lt;/tt&gt; (I set mine to command-t).&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;tkcvs&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Edit the &lt;tt&gt;cvsdiff&lt;/tt&gt; script in the &lt;tt&gt;contrib&lt;/tt&gt; directory.&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;bbedit contrib/cvsdiff&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Find the line: &lt;tt&gt;VDIFF=&quot;gvim -d -f&quot;&lt;/tt&gt; and replace it with:&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;VDIFF=&quot;bbdiff --wait --resume&quot;&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Copy the &lt;tt&gt;cvsdiff&lt;/tt&gt; script in the &lt;tt&gt;contrib&lt;/tt&gt; directory to &lt;tt&gt;/usr/local/bin&lt;/tt&gt;.&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;sudo cp contrib/cvsdiff /usr/local/bin/cvsdiff&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Edit the &lt;tt&gt;.tkcvs&lt;/tt&gt; config file to use the diff wrapper script and &lt;tt&gt;bbedit&lt;/tt&gt; for comparing and editing.&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;bbedit ~/.tkcvs&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Add the following lines to the config file.&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;set cvscfg(editor) &quot;bbedit --wait --resume&quot;&lt;br /&gt;
set cvscfg(tkdiff) &quot;/usr/local/bin/cvsdiff&quot;&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Launch TkCVS again via X11 &lt;tt&gt;xterm&lt;/tt&gt; and you&#039;re good to go!&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;tkcvs&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
Oh yeah. Don&#039;t forget that to cut/copy/paste (etc...) you need to use the control key and not the command key. You&#039;re in X-Windows after all. &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Wed, 27 Jun 2007 20:44:38 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/130-guid.html</guid>
    
</item>
<item>
    <title>Download all Space.com Wallpapers</title>
    <link>http://blog.latcarf.com/archives/125-Download-all-Space.com-Wallpapers.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/125-Download-all-Space.com-Wallpapers.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=125</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=125</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    This is a really quick and dirty script I banged out in about a half-hour to download all the wallpapers at &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=601&amp;amp;entry_id=125&quot;  onmouseover=&quot;window.status=&#039;http://space.com&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot; title=&quot;Space.com&quot;&gt;Space.com&lt;/a&gt;. I like reading the articles at &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=601&amp;amp;entry_id=125&quot;  onmouseover=&quot;window.status=&#039;http://space.com&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot; title=&quot;Space.com&quot;&gt;Space.com&lt;/a&gt; from time to time and I found the wallpapers there are pretty cool. I wanted to grab them all and use them for my Mac OS X screensaver. Of course, downloading them individually (click, click, click, right-click, save as, etc... - ad infinitum), is a pain in the ass. So, the &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=601&amp;amp;entry_id=125&quot;  onmouseover=&quot;window.status=&#039;http://space.com&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot; title=&quot;Space.com&quot;&gt;Space.com&lt;/a&gt; Wallpaper Download (sdcwd) script was born! &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
The script recursively downloads all the images of the specified size, creating folders for each collection. Just start it and let it run!&lt;br /&gt;
&lt;br /&gt;
I used the following software and versions, you&#039;ll need &lt;tt&gt;&#039;-o&#039;&lt;/tt&gt; support in &lt;tt&gt;grep&lt;/tt&gt; for sure and have &lt;tt&gt;curl&lt;/tt&gt; and &lt;tt&gt;wget&lt;/tt&gt; installed. Of course, if the urls change at &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=601&amp;amp;entry_id=125&quot;  onmouseover=&quot;window.status=&#039;http://space.com&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot; title=&quot;Space.com&quot;&gt;Space.com&lt;/a&gt;, this script will be broken. Your mileage may vary.&lt;br /&gt;
&lt;br /&gt;
Software Versions:&lt;br /&gt;
curl - curl 7.13.1&lt;br /&gt;
grep - grep (GNU grep) 2.5.1&lt;br /&gt;
wget - GNU Wget 1.8.2&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;bash&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Space.com Wallpaper Download (sdcwd)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;image_size=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;1280&quot;&lt;/span&gt; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Set this to 640, 800, 1024, or 1280 depending on the image size you want&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;collections=&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;`curl -s http://www.space.com/php/multimedia/downloads/wallpapers/collection.php?&lt;span style=&quot;color: #0000ff;&quot;&gt;collection=&lt;/span&gt;adrian_lark | \&lt;br /&gt;grep -o &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;option value=&amp;quot;collection.php?collection=&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\(&lt;/span&gt;.*&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\)&lt;/span&gt;&amp;quot;&#039;&lt;/span&gt; | \&lt;br /&gt;sed &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;s,option value=&amp;quot;collection.php?collection=&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\(&lt;/span&gt;.*&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\)&lt;/span&gt;&amp;quot;,&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\1&lt;/span&gt;,&#039;&lt;/span&gt;`&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;collection_url=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;http://www.space.com/php/multimedia/downloads/wallpapers/collection.php?collection=&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;image_url=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;http://a52.g.akamaitech.net/f/52/827/1d/www.space.com/entertainment/downloads/spaceart/images/&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;logFile=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;sdcwd.log&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;topDir=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Space.com_Wallpapers&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;getImages&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;this_collection=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #0000ff;&quot;&gt;collurl=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${collection_url}${this_collection}&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; ! -d &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$this_collection&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; mkdir &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$this_collection&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$this_collection&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Log&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;----------------------------&quot;&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../$logFile&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$this_collection&quot;&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../$logFile&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;----------------------------&quot;&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../$logFile&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; curl -s &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$collurl&quot;&lt;/span&gt; | grep &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;/php/multimedia/imagedisplay/wallpaper_display.php?pic=.*_$image_size&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\.&lt;/span&gt;jpg&quot;&lt;/span&gt; | \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; grep -o &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;pic=&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\(&lt;/span&gt;.*.jpg&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\)&lt;/span&gt;&quot;&lt;/span&gt; | \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; sed &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;s,pic=,$image_url,&quot;&lt;/span&gt; | \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; tee -a &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../$logFile&quot;&lt;/span&gt; | \&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; xargs wget -q&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Log&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&quot;&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../$logFile&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../$logFile&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; ../&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# If we didn&#039;t download any pics for this directory (maybe the requested size wasn&#039;t available)&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# remove the empty directory.&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; find &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$this_collection&quot;&lt;/span&gt; -&lt;span style=&quot;color: #000066;&quot;&gt;type&lt;/span&gt; d -empty | xargs rmdir&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;old_dir=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;`pwd`&quot;&lt;/span&gt;&lt;br /&gt;mkdir &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$topDir&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$topDir&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; this_collection &lt;span style=&quot;color: #b1b100;&quot;&gt;in&lt;/span&gt; $&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;collections&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;@&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;do&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; getImages &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$this_collection&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;done&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$old_dir&quot;&lt;/span&gt;&lt;br /&gt;&amp;#160;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Mon, 09 Apr 2007 01:01:17 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/125-guid.html</guid>
    
</item>
<item>
    <title>Recursively Convert Line-Endings</title>
    <link>http://blog.latcarf.com/archives/124-Recursively-Convert-Line-Endings.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/124-Recursively-Convert-Line-Endings.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=124</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=124</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    &lt;div class=&quot;locution_cli&quot;&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; find . -type f -exec perl -pi -e &#039;s/\r\n?/\n/g&#039; {} \; &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Found on &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=586&amp;amp;entry_id=124&quot;  onmouseover=&quot;window.status=&#039;http://madross.com/convert-windows-line-endings-to-unix-os-x/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; title=&quot;Madness and Macness&quot; target=&quot;locution&quot;&gt;Madness &amp;amp; Macness&lt;/a&gt; 
    </content:encoded>

    <pubDate>Wed, 07 Mar 2007 22:15:32 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/124-guid.html</guid>
    
</item>
<item>
    <title>Upgrade Hard Drive on Debian Linux (Sarge)</title>
    <link>http://blog.latcarf.com/archives/110-Upgrade-Hard-Drive-on-Debian-Linux-Sarge.html</link>
            <category>Linux</category>
    
    <comments>http://blog.latcarf.com/archives/110-Upgrade-Hard-Drive-on-Debian-Linux-Sarge.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=110</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=110</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    This weekend I decided to upgrade my Linux server (the same server running this weblog). The machine is a decommissioned corporate Compaq DeskPro EN - 1GHz Pentium III with a 20GB hard drive. When I first installed Debian 3.1 (Sarge) I installed it on the original hard drive. I ran it that way for over two years and finally decided to replace the hard drive with a 300GB one. After doing some Googling on the subject, it seemed like this might not be too hard. Then, this is Linux after all and even the simplest tasks can balloon in complexity depending on the hardware you&#039;re working with. As I worked through the task it seemed a little tough but, in retrospect, it really wasn&#039;t that problematic. Here&#039;s what I did... &lt;br /&gt;&lt;a href=&quot;http://blog.latcarf.com/archives/110-Upgrade-Hard-Drive-on-Debian-Linux-Sarge.html#extended&quot;&gt;Continue reading &quot;Upgrade Hard Drive on Debian Linux (Sarge)&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 10 Sep 2006 23:23:43 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/110-guid.html</guid>
    
</item>
<item>
    <title>Convert Date to UNIX Timestamp</title>
    <link>http://blog.latcarf.com/archives/101-Convert-Date-to-UNIX-Timestamp.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/101-Convert-Date-to-UNIX-Timestamp.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=101</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=101</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    I looked all over trying to find an easy way to convert a date to a UNIX timestamp in a shell or perl script. I was disappointed that I didn&#039;t find anything that was easy, sure and didn&#039;t require extra software. Most of my UNIX scripts have to operate on Mac OS X so I don&#039;t concern myself too much about portability and generally try to use what&#039;s already available on the system.&lt;br /&gt;
&lt;br /&gt;
The easiest way I found to convert a date string to a UNIX timestamp is with PHP&#039;s &lt;tt&gt;strtotime&lt;/tt&gt; function. Fortunately, PHP is included on Mac OS X machine at no extra charge! &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; This one-liner handles the need pretty well.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; my_stamp=`php -r \ &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&#039;fwrite(STDOUT,strtotime(&quot;2006-05-08 15:23:52&quot;));&#039;` &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; echo $my_stamp&lt;/font&gt; &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
1147127032&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The constants: &lt;tt&gt;STDIN&lt;/tt&gt;, &lt;tt&gt;STDOUT&lt;/tt&gt;, and &lt;tt&gt;STDERR&lt;/tt&gt; are predefined to make life easy!&lt;br /&gt;
&lt;br /&gt;
For more info, check out: &quot;&lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=441&amp;amp;entry_id=101&quot;  onmouseover=&quot;window.status=&#039;http://us3.php.net/features.commandline&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot; title=&quot;Using PHP from the command line&quot;&gt;Using PHP from the command line&lt;/a&gt;.&quot;&lt;br /&gt;
&lt;br /&gt; 
    </content:encoded>

    <pubDate>Tue, 09 May 2006 13:39:28 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/101-guid.html</guid>
    
</item>
<item>
    <title>An Easy SQL Search and Replace</title>
    <link>http://blog.latcarf.com/archives/99-An-Easy-SQL-Search-and-Replace.html</link>
            <category>Linux</category>
    
    <comments>http://blog.latcarf.com/archives/99-An-Easy-SQL-Search-and-Replace.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=99</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=99</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    After making some path changes this blog here, I needed to update some of the URLs in previous entries (mainly image URLs). I thought it was going to be tough but it turns out there&#039;s an easy way to do it with a SQL one-liner.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;sql&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;UPDATE&lt;/span&gt; myTable &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;SET&lt;/span&gt; myColumn = &lt;span style=&quot;color: #993333; font-weight: bold;&quot;&gt;REPLACE&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;myColumn, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;searchText&#039;&lt;/span&gt;, &lt;span style=&quot;color: #ff0000;&quot;&gt;&#039;replaceText&#039;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I love simple solutions! &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Thu, 04 May 2006 13:25:21 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/99-guid.html</guid>
    
</item>
<item>
    <title>Recursively Delete Subversion Properties</title>
    <link>http://blog.latcarf.com/archives/98-Recursively-Delete-Subversion-Properties.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/98-Recursively-Delete-Subversion-Properties.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=98</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=98</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    My conversion from cvs to svn caused a bunch of files to end up with svn:keywords set for Author, Date, Revision, and Id. I recursively deleted the svn:keywords property from all the files with the following command. This could work with other svn property commands as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; cd ~/sandbox/project/ &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; find . ! -path &quot;*svn*&quot; \&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;&amp;gt;&lt;/font&gt; -exec svn propdel &quot;svn:keywords&quot; &quot;{}&quot; \; &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt; 
    </content:encoded>

    <pubDate>Fri, 14 Apr 2006 19:08:47 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/98-guid.html</guid>
    
</item>
<item>
    <title>iconv Character Set Conversion</title>
    <link>http://blog.latcarf.com/archives/68-iconv-Character-Set-Conversion.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/68-iconv-Character-Set-Conversion.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=68</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=68</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    I ran in to an issue the other day where I needed to perform some regular expression matching on a file and then edit the file&#039;s contents. Not a big problem really, I do it all the time, but this case was different as the file involved was encoded in UTF-16.&lt;br /&gt;
&lt;br /&gt;
I see more and more Unicode files these days and at first I was worried by what I might have to do to manipulate this particular file. A little bit of research led me to something that made life super easy!&lt;br /&gt;
&lt;br /&gt;
The UNIX command (available on Mac OS X and Debian boxes) &#039;&lt;b&gt;iconv&lt;/b&gt;&#039; does the work for me. &#039;iconv&#039; can convert to any character set encoding available on your particular system. For my purposes, I just converted my UTF-16 file into a MacRoman file. Next, I manipulated to my heart&#039;s content, then I re-converted to UTF-16. It was easy as pie. I also used the command to convert a whole bunch of UTF-16 files to UTF-8, it was no problem. Here&#039;s the actual command in action:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;font color=&quot;#69C&quot;&gt;$ &lt;/font&gt;iconv -f UTF-16 -t MacRoman my_file &gt; my_new_file&lt;font color=&quot;green&quot;&gt; &amp;#172;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Fri, 01 Apr 2005 17:57:17 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/68-guid.html</guid>
    
</item>
<item>
    <title>Awk's Built-in NF Variable</title>
    <link>http://blog.latcarf.com/archives/67-Awks-Built-in-NF-Variable.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/67-Awks-Built-in-NF-Variable.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=67</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=67</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    Use the awk &#039;NF&#039; (number of fields) built-in variable as an easy way to get the last field of a multi-word output. Here is an example using Mac OS X&#039;s hdiutil command to get just the calculated checksum of a disk image.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;font color=&quot;#69C&quot;&gt;$ &lt;/font&gt;foo=`hdiutil checksum -type UDIF-CRC32 myimage.dmg`&lt;font color=&quot;green&quot;&gt; &amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$ &lt;/font&gt; echo $foo | awk &#039;{print $NF}&#039;&lt;font color=&quot;green&quot;&gt; &amp;#172;&lt;/font&gt;&lt;br /&gt;
$5C63390B&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Tue, 29 Mar 2005 15:26:58 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/67-guid.html</guid>
    
</item>
<item>
    <title>Mac OS X RAM Disk</title>
    <link>http://blog.latcarf.com/archives/66-Mac-OS-X-RAM-Disk.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/66-Mac-OS-X-RAM-Disk.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=66</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=66</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    Here&#039;s a cli way to create RAM disks on Mac OS X. Unless you have a huge amount of RAM, you&#039;ll probably not want to do this. Besides, Mac OS X has surperb i/o caching and virtual memory management so you might not see much of a performance boost with a RAM disk. I compiled one of our apps on a RAM disk and it didn&#039;t make a lick of difference in compile speed. Anyway, here&#039;s how to create the RAM disk:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; NUMSECTORS=1228800 # 600MB &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; VOLUMENAME=RAM_Disk &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; mydev=`hdid -nomount ram://$NUMSECTORS` &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; newfs_hfs -v $VOLUMENAME $mydev &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; mkdir /Volumes/$VOLUMENAME &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; mount -t hfs $mydev /Volumes/$VOLUMENAME &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;
Here&#039;s is how to remove the RAM disk:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;locution_cli&quot;&gt;&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; umount $mydev &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; hdiutil detach $mydev &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;br /&gt;
&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; rmdir /Volumes/$VOLUMENAME &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 23 Mar 2005 19:13:38 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/66-guid.html</guid>
    
</item>
<item>
    <title>Can't Export Arrays in BASH</title>
    <link>http://blog.latcarf.com/archives/61-Cant-Export-Arrays-in-BASH.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/61-Cant-Export-Arrays-in-BASH.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=61</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    After fiddling for hours with a script born of a Frankenstein marriage between AppleScript and bash, I found out what I am trying to do impossible. &gt;:-o&lt;br /&gt;
&lt;br /&gt;
Arrays cannot be exported in the bash shell. Let me say that again for posterity. You cannot export an array in bash, ever! This fact is a real pain in the ass. I think I understand why; The environment is actually an array of variables and bash only supports one-dimensional arrays. Therefore, you can&#039;t move an array into an array. &lt;img src=&quot;http://blog.latcarf.com/templates/default/img/emoticons/sad.png&quot; alt=&quot;:-(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.latcarf.com/archives/61-Cant-Export-Arrays-in-BASH.html#extended&quot;&gt;Continue reading &quot;Can&#039;t Export Arrays in BASH&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 14 Mar 2005 20:03:50 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/61-guid.html</guid>
    
</item>
<item>
    <title>Serendipity - Content Rewriter Plugin</title>
    <link>http://blog.latcarf.com/archives/44-Serendipity-Content-Rewriter-Plugin.html</link>
            <category>Linux</category>
    
    <comments>http://blog.latcarf.com/archives/44-Serendipity-Content-Rewriter-Plugin.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=44</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=44</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    I love Serendipity. I&#039;m not talking here about serendipity the phenomenon when you find something you like that you weren&#039;t even looking for (though it kind of applies). I am talking about &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=187&amp;amp;entry_id=44&quot; title=&quot;http://www.s9y.org&quot;  onmouseover=&quot;window.status=&#039;http://www.s9y.org&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot;&gt;Serendipity&lt;/a&gt; - the &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=188&amp;amp;entry_id=44&quot; title=&quot;http://www.php.net/&quot;  onmouseover=&quot;window.status=&#039;http://www.php.net/&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot;&gt;php&lt;/a&gt; based weblog system. Indeed, it powers this log and &lt;a href=&quot;http://blog.latcarf.com/exit.php?url_id=189&amp;amp;entry_id=44&quot; title=&quot;http://www.latcarf.com/FFXI&quot;  onmouseover=&quot;window.status=&#039;http://www.latcarf.com/FFXI&#039;;return true;&quot; onmouseout=&quot;window.status=&#039;&#039;;return true;&quot; target=&quot;locution&quot;&gt;another&lt;/a&gt; I&#039;ve made. It&#039;s open source, reliable, and makes blogging very easy. The plugin system is robust enough to make it very extensible. But there is one plugin that is driving me nuts. &lt;br /&gt;&lt;a href=&quot;http://blog.latcarf.com/archives/44-Serendipity-Content-Rewriter-Plugin.html#extended&quot;&gt;Continue reading &quot;Serendipity - Content Rewriter Plugin&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 13 Feb 2005 17:55:06 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/44-guid.html</guid>
    
</item>
<item>
    <title>Output man pages to a file</title>
    <link>http://blog.latcarf.com/archives/40-Output-man-pages-to-a-file.html</link>
            <category>CLI</category>
    
    <comments>http://blog.latcarf.com/archives/40-Output-man-pages-to-a-file.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=40</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=40</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    &lt;div class=&quot;locution_cli&quot;&gt;&lt;font color=&quot;#69C&quot;&gt;$&lt;/font&gt; man &quot;command_name&quot; | col -b &gt; ~/filename &lt;font color=&quot;green&quot;&gt;&amp;#172;&lt;/font&gt;&lt;/div&gt;&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Wed, 09 Feb 2005 15:49:48 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/40-guid.html</guid>
    
</item>
<item>
    <title>Installing Debian GNU/Linux 3.1 (sarge) on Apple iBook</title>
    <link>http://blog.latcarf.com/archives/20-Installing-Debian-GNULinux-3.1-sarge-on-Apple-iBook.html</link>
            <category>Linux</category>
    
    <comments>http://blog.latcarf.com/archives/20-Installing-Debian-GNULinux-3.1-sarge-on-Apple-iBook.html#comments</comments>
    <wfw:comment>http://blog.latcarf.com/wfwcomment.php?cid=20</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.latcarf.com/rss.php?version=2.0&amp;type=comments&amp;cid=20</wfw:commentRss>
    

    <author>nospam@example.com (Latcarf)</author>
    <content:encoded>
    These instructions will walk you through installing and setting up Debian 3.1 (sarge) on an older Apple iBook. Here I am installing a Linux-only system. That is, there is no Mac OS X system installed on this computer anymore (indeed no Apple software at all). This is a straight Debian GNU/Linux system running on Apple hardware. If it sounds like something you want, read on...&lt;br /&gt;
&lt;br /&gt;
The iBook:&lt;br /&gt;
Firewire SE - Graphite &quot;clamshell&quot; - 466MHz G3 - 20GB HD&lt;br /&gt;
&lt;br /&gt;
The System:&lt;br /&gt;
Debian 3.1 (sarge - currently Debian &quot;testing&quot;) &lt;br /&gt;&lt;a href=&quot;http://blog.latcarf.com/archives/20-Installing-Debian-GNULinux-3.1-sarge-on-Apple-iBook.html#extended&quot;&gt;Continue reading &quot;Installing Debian GNU/Linux 3.1 (sarge) on Apple iBook&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Thu, 23 Dec 2004 21:26:55 -0400</pubDate>
    <guid isPermaLink="false">http://blog.latcarf.com/archives/20-guid.html</guid>
    
</item>

</channel>
</rss>