<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>david winter &#187; mac</title>
	<atom:link href="http://davidwinter.me.uk/articles/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidwinter.me.uk</link>
	<description>you were expecting someone else?</description>
	<lastBuildDate>Mon, 28 Jun 2010 20:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using o2 PAYG mobile broadband</title>
		<link>http://davidwinter.me.uk/articles/2010/06/19/using-o2-payg-mobile-broadband/</link>
		<comments>http://davidwinter.me.uk/articles/2010/06/19/using-o2-payg-mobile-broadband/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 21:34:42 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[o2]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=195</guid>
		<description><![CDATA[Our internet connection via our landline has been dead since Tuesday afternoon, so I&#8217;ve needed an alternative connection in the meantime to give me my twitter fix! I&#8217;d kept an eye on the o2 pay-as-you-go mobile broadband for a while, because it offered the cheapest, noncommittal setup. A one off £20 for the USB dongle, [...]]]></description>
			<content:encoded><![CDATA[<p>Our internet connection via our landline has been dead since Tuesday afternoon, so I&#8217;ve needed an alternative connection in the meantime to give me my twitter fix! </p>

<p>I&#8217;d kept an eye on the o2 pay-as-you-go mobile broadband for a while, because it offered the cheapest, noncommittal setup. A one off £20 for the USB dongle, and then as little as £2 for 500MB for a 24 hour period. </p>

<p>So I plug in the dongle and we get a nice little installer to set everything up; installing drivers and the o2 Mobile Connect application. The annoying thing is that if you install going this route, you can only connect if you have this app open. You can&#8217;t just use system preferences. Also, turns out this &#8216;handy&#8217; installer program then blocks you from getting to the installation files again, and the dongle will refuse to do anything unless Mobile Connect is open (you&#8217;ll get a red light on the dongle when it&#8217;s being evil).</p>

<p>So, what can you do?</p>

<p><span id="more-195"></span></p>

<ol>
<li>Drag <code>Mobile Connect.app</code> to the trash from your Applications directory. </li>
<li>Then head into System > Library > Extensions and delete <code>ZTEUSBCDCACMData.kext</code> and <code>ZTEUSBMassStorageFilter.kext</code></li>
<li>Go into Network in System Preferences and remove the devices starting with ZTEUSB.</li>
<li>Then restart your Mac.</li>
</ol>

<p>Now, let&#8217;s install things a different route giving everyone more flexibility.</p>

<ol>
<li>Plug in the dongle and when the CD Icon appears on the desktop, open it up, but rather than double clicking on the installer, right click on it and select &#8216;Show Package Contents&#8217;. </li>
<li>Now head to Contents then Resources. Now double click on the <code>drv.pkg</code> file and install this only. </li>
<li>Once complete, restart your Mac again. </li>
</ol>

<p>And now to configure the connection:</p>

<ol>
<li>Open System Preferences, and go to the Network pane. </li>
<li>You should have three new items in there. Click on ZTEUSBModem. </li>
<li>Set the telephone number to <code>*99#</code></li>
<li>Username to <code>o2bb</code></li>
<li>Password to <code>password</code> </li>
<li>Click on Advanced. Select Vendor; Generic, Model; GPRS (GSM/3G) and set the APN to <code>m-bb.o2.co.uk</code> </li>
<li>Click on OK and then Apply. </li>
<li>Now you can click &#8216;Connect&#8217; and all should work fine. </li>
</ol>

<p>That is of course, besides the crappy image compression and caching o2 force onto you! Need to find a solution for that next.</p>

<p><strong>Update</strong>: Here&#8217;s a solution for getting around the image compression, and Javascript injection; use a SSH SOCKS proxy. Works a treat.</p>

<ol>
<li>Open up <code>Terminal.app</code></li>
<li>Run <code>ssh -ND 9999 username@yourserver.com</code></li>
<li>Enter your password if/when prompted (you may have key authentication setup)</li>
<li>That&#8217;s the SOCKS proxy setup. Now go to System Preferences and open the network connection.</li>
<li>Click on ZTEUSBModem.</li>
<li>Then Advanced, Proxies</li>
<li>Check the SOCKS Proxy and enter in <code>localhost</code> and <code>9999</code></li>
<li>Click OK and then Apply.</li>
</ol>

<p>All done. You should now get perfect images and no longer have Javascript inserted into all webpages. Both of which weren&#8217;t clearly mentioned when purchasing my dongle.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2010/06/19/using-o2-payg-mobile-broadband/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache, PHP and MongoDB on Mac OS X 10.6 Snow Leopard</title>
		<link>http://davidwinter.me.uk/articles/2010/01/02/apache-php-and-mongodb-on-mac-os-x-10-6-snow-leopard/</link>
		<comments>http://davidwinter.me.uk/articles/2010/01/02/apache-php-and-mongodb-on-mac-os-x-10-6-snow-leopard/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 13:12:13 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=152</guid>
		<description><![CDATA[MongoDB (from &#8220;humongous&#8221;) is a scalable, high-performance, open source, schema-free, document-oriented database. There&#8217;s a lot of buzz brewing about it, so I wanted to give it a try with PHP on my development Mac. The following is how I went about installing Apache, PHP and MongoDB on Snow Leopard. You must have installed the Xcode [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mongodb.org/display/DOCS/Home">MongoDB</a> (from &#8220;humongous&#8221;) is a scalable, high-performance, open source, schema-free, document-oriented database.</p>

<p>There&#8217;s a lot of <a href="http://delicious.com/search?p=mongodb&amp;chk=&amp;context=popular|&amp;fr=del_icio_us&amp;lc=">buzz</a> brewing about it, so I wanted to give it a try with PHP on my development Mac. The following is how I went about installing Apache, PHP and MongoDB on Snow Leopard. You must have installed the <a href="[http://developer.apple.com/tools/xcode/">Xcode</a> developer tools (found on the Snow Leopard install DVD) and <a href="[http://www.macports.org/">MacPorts</a> for this to all work.</p>

<p><span id="more-152"></span></p>

<p>First, let&#8217;s install Apache:</p>

<pre><code>sudo port install apache2
</code></pre>

<p>Nice and simple. Now we can move onto PHP:</p>

<pre><code>sudo port install php5 +apache2 +pear
</code></pre>

<p>To enable PHP for Apache:</p>

<pre><code>cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
</code></pre>

<p>I like to make some alias commands for starting, restarting and stopping Apache:</p>

<pre><code>mate ~/.bashrc

alias apache-start="sudo /opt/local/apache2/bin/apachectl start"
alias apache-restart="sudo /opt/local/apache2/bin/apachectl restart"
alias apache-stop="sudo /opt/local/apache2/bin/apachectl stop"

source ~/.bashrc
</code></pre>

<p>Now we can make a few changes to the Apache config so that we can use our Sites directory:</p>

<pre><code>sudo mate /opt/local/apache2/conf/httpd.conf
</code></pre>

<p>I&#8217;m using Textmate here (<code>mate</code>), but you can use any editor you wish, like <code>nano</code>.</p>

<p>Change the <code>DocumentRoot</code>:</p>

<pre><code>DocumentRoot "/Users/davidwinter/Sites"
</code></pre>

<p>Then update the <code>&lt;Directory&gt;</code> path to the updated <code>DocumentRoot</code> path.  </p>

<pre><code>&lt;Directory "/Users/davidwinter/Sites"&gt;
</code></pre>

<p>We also want to enable <code>index.php</code> as a directory index file:</p>

<pre><code>&lt;IfModule dir_module&gt;
    DirectoryIndex index.html index.php
&lt;/IfModule&gt;
</code></pre>

<p>And then add the PHP mime type:</p>

<pre><code>&lt;IfModule mime_module&gt;
    ...
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
&lt;/IfModule&gt;
</code></pre>

<p>Now we need to setup the <code>php.ini</code> file:</p>

<pre><code>sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini

sudo mate /opt/local/etc/php5/php.ini
</code></pre>

<p>My <a href="[http://php.net/manual/en/timezones.php">timezone</a> is for London:</p>

<pre><code>date.timezone = Europe/London
</code></pre>

<p>Now we can get onto installing MongoDB (this will install the latest stable version as of time of writing &#8211; 1.2.1): </p>

<pre><code>sudo port install mongodb
</code></pre>

<p>And then the PHP MongoDB extension:</p>

<pre><code>sudo pecl install mongo
</code></pre>

<p>You&#8217;ll need to add the extension to the bottom of your <code>php.ini</code> file:</p>

<pre><code>sudo mate /opt/local/etc/php5/php.ini

extension=mongo.so
</code></pre>

<p>Now startup Apache using the <code>alias</code> created earlier:</p>

<pre><code>apache-start
</code></pre>

<p>If you create a file in your Sites directory, called <code>test.php</code>, and add the following to it:</p>

<pre><code>&lt;?php phpinfo(); ?&gt;
</code></pre>

<p>Then visit the page in your browser; <a href="http://localhost/test.php">http://localhost/test.php</a></p>

<p>You can then scroll down the page and you should see a section titled &#8216;mongo&#8217;. This means the extension is working!</p>

<p>Now we need to startup MongoDB:</p>

<pre><code>mkdir -p ~/data/db
mongod --dbpath ~/data/db/
</code></pre>

<p>Almost there, now a simple MongoDB test in PHP:</p>

<pre><code>&lt;?php
// Connect:
$connection = new Mongo();
// Select database:
$db = $connection-&gt;my_db;
// Select collection:
$films = $db-&gt;films;

$frwl = array(
    'title' =&gt; 'From Russia With Love',
    'year' =&gt; 1963,
    'actor' =&gt; 'Sean Connery'
);
// Save array to collection:
$films-&gt;insert($frwl);

$gf = array(
    'title' =&gt; 'Goldfinger',
    'year' =&gt; 1964,
    'actor' =&gt; 'Sean Connery',
    'girl' =&gt; 'Pussy Galore'
);

$films-&gt;insert($gf);

// Count documents in collection:
if ($films-&gt;count()): ?&gt;
&lt;table&gt;
    &lt;tr&gt;
        &lt;th&gt;Title&lt;/th&gt;
        &lt;th&gt;Year&lt;/th&gt;
        &lt;th&gt;Actor&lt;/th&gt;
        &lt;th&gt;Girl&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php foreach ($films-&gt;find() as $film): ?&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;?php echo $film['title']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $film['year']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $film['actor']; ?&gt;&lt;/td&gt;
        &lt;td&gt;&lt;?php echo $film['girl']; ?&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;?php endforeach; ?&gt;
&lt;/table&gt;
&lt;?php endif;
?&gt;
</code></pre>

<p>Very exciting stuff. More to follow.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2010/01/02/apache-php-and-mongodb-on-mac-os-x-10-6-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Applescript to shutdown in 15 seconds</title>
		<link>http://davidwinter.me.uk/articles/2009/05/28/applescript-to-shutdown-in-15-seconds/</link>
		<comments>http://davidwinter.me.uk/articles/2009/05/28/applescript-to-shutdown-in-15-seconds/#comments</comments>
		<pubDate>Thu, 28 May 2009 19:25:33 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2009/05/28/applescript-to-shutdown-in-15-seconds/</guid>
		<description><![CDATA[set userCancelled to false try set answer to display dialog "Backup complete. Shutting down in 15 seconds." giving up after 15 on error number -128 set userCancelled to true end try if userCancelled then else if gave up of answer then tell application "Finder" shut down end tell end if]]></description>
			<content:encoded><![CDATA[<pre><code>set userCancelled to false

try
    set answer to display dialog "Backup complete. Shutting down in 15 seconds." giving up after 15
on error number -128
    set userCancelled to true
end try

if userCancelled then

else if gave up of answer then
    tell application "Finder"
        shut down
    end tell
end if
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2009/05/28/applescript-to-shutdown-in-15-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install pecl_http for PHP</title>
		<link>http://davidwinter.me.uk/articles/2008/11/24/install-pecl_http-for-php/</link>
		<comments>http://davidwinter.me.uk/articles/2008/11/24/install-pecl_http-for-php/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 21:33:41 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pecl_http]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=117</guid>
		<description><![CDATA[You will probably want to ensure that curl supports https before getting underway: curl -V Check that the output contains https: &#62;: curl -V curl 7.19.2 (i386-apple-darwin9.5.0) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3 Protocols: tftp ftp telnet dict http file https ftps Features: Largefile NTLM SSL libz If it doesn&#8217;t: sudo port deactivate curl sudo port install curl [...]]]></description>
			<content:encoded><![CDATA[<p>You will probably want to ensure that <code>curl</code> supports <code>https</code> before getting underway:</p>

<pre><code>curl -V
</code></pre>

<p>Check that the output contains <code>https</code>:</p>

<pre><code>&gt;: curl -V
curl 7.19.2 (i386-apple-darwin9.5.0) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3
Protocols: tftp ftp telnet dict http file https ftps 
Features: Largefile NTLM SSL libz
</code></pre>

<p>If it doesn&#8217;t:</p>

<pre><code>sudo port deactivate curl
sudo port install curl +ssl
</code></pre>

<p>Once you have <code>curl</code> with <code>https</code> support:</p>

<pre><code>sudo pecl install pecl_http
</code></pre>

<p>If you followed my previous <a href="/articles/2008/11/22/php5-lighttpd-and-imagick-on-mac-os-x-leopard/">howto</a>, you&#8217;ll want to move the module to the location specified in your <code>php.ini</code> file:</p>

<pre><code>sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20060613/http.so /opt/local/lib/php/extensions
</code></pre>

<p>Restart <code>lighttpd</code> and then you&#8217;ll be good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/11/24/install-pecl_http-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install PHP5, lighttpd and Imagick on Mac OS X Leopard</title>
		<link>http://davidwinter.me.uk/articles/2008/11/22/php5-lighttpd-and-imagick-on-mac-os-x-leopard/</link>
		<comments>http://davidwinter.me.uk/articles/2008/11/22/php5-lighttpd-and-imagick-on-mac-os-x-leopard/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 19:51:23 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=101</guid>
		<description><![CDATA[It&#8217;s a little tricky getting a nice clean install of PHP5 for OS X 10.5. The packages that I always used to depend on over at Entropy don&#8217;t seem to work anymore. At least not for Leopard. A great shame. I&#8217;m now switching to lighttpd for my development server, so have come up with the [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a little tricky getting a nice clean install of <a href="http://www.php.net">PHP5</a> for OS X 10.5. The packages that I always used to depend on over at <a href="http://www.entropy.ch/software/macosx/php/">Entropy</a> don&#8217;t seem to work anymore. At least not for Leopard. A great shame.</p>

<p>I&#8217;m now switching to <a href="http://www.lighttpd.net">lighttpd</a> for my development server, so have come up with the following recipe to install PHP5 and the great <a href="http://www.php.net/imagick">Imagick</a> extension for image manipulation.</p>

<p><span id="more-101"></span></p>

<p>Follow these instructions at your own risk! They worked fine on my setup but I can&#8217;t guarantee they will for you.</p>

<ol>
<li>Install <a href="http://developer.apple.com/technology/xcode.html">Xcode</a>.</li>
<li>Install <a href="http://www.macports.org/">MacPorts</a>.</li>
<li><p>Now update MacPorts:</p>

<pre><code>sudo port selfupdate
</code></pre></li>
<li><p>Install lighttpd:</p>

<pre><code>sudo port install lighttpd
</code></pre>

<p>Install the startup item and copy the default configuration file:</p>

<pre><code>sudo launchctl load -w /Library/LaunchDaemons/org.macports.lighttpd.plist
sudo cp /opt/local/etc/lighttpd/lighttpd.conf.default /opt/local/etc/lighttpd/lighttpd.conf
</code></pre></li>
<li><p>Now we install PHP with the FastCGI, MySQL and Pear variants.</p>

<pre><code>sudo port install php5 +fastcgi +mysql5 +pear
</code></pre>

<p>In order for this to work, I had to disable the port <code>perl5.8</code> by using the following command:</p>

<pre><code>sudo port deactivate perl5.8
sudo port activate perl5
</code></pre>

<p>Then run the command again and it should succeed:</p>

<pre><code>sudo port install php5 +fastcgi +mysql5 +pear
</code></pre></li>
<li><p>Copy over the default PHP configuration:</p>

<pre><code>sudo cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini
</code></pre></li>
<li><p>Now open up the PHP configuration file:</p>

<pre><code>sudo mate /opt/local/etc/php.ini
</code></pre>

<p>Add the following line to the file:</p>

<pre><code>cgi.fix_pathinfo=1
</code></pre>

<p>Find <code>extension_dir = "./"</code> and replace it with:</p>

<pre><code>extension_dir = "/opt/local/lib/php/extensions"
extension=imagick.so
</code></pre></li>
<li><p>Edit the lighttpd configuration file:</p>

<pre><code>sudo mate /opt/local/etc/lighttpd/lighttpd.conf
</code></pre>

<p>Ensure that the following is uncommented:</p>

<pre><code>fastcgi.server = ( ".php" =&gt;
    ( "localhost" =&gt;
        (
            "socket" =&gt; "/var/run/lighttpd/php-fastcgi.socket",
            "bin-path" =&gt; "/opt/local/bin/php-cgi"
        )
    )
)
</code></pre>

<p>And also make lighttpd run as the user <code>www</code>:</p>

<pre><code>server.username = "www"
server.groupname = "www"
</code></pre>

<p>Add the following if you want to be able to use your <code>Sites</code> directory in your home directory. I also changed the default document root to the OS X default:</p>

<pre><code>server.modules += ("mod_userdir")
userdir.path = "Sites"
userdir.basepath = "/Users/"
server.document-root = "/Library/WebServer/Documents"
</code></pre>

<p>Ensure that <code>"mod_fastcgi",</code> is uncommented.</p></li>
<li><p>Now we need to setup a few directories, and make the user <code>www</code> the owner for them:</p>

<pre><code>sudo mkdir /var/run/lighttpd
sudo mkdir /var/log/lighttpd
sudo chown www:www /var/run/lighttpd
sudo chown www:www /var/log/lighttpd
</code></pre></li>
<li><p>Now install ImageMagick:</p>

<pre><code>sudo port install imagemagick
</code></pre></li>
<li><p>Now we need to download the Imagick PHP module. I was hoping this would be as easy as <code>sudo pecl install imagick</code>, however I got an error for that, and so a manual build and install of the module is necessary:</p>

<pre><code>curl -O http://pecl.php.net/get/imagick-2.2.1.tgz
tar xvfz imagick-2.2.1.tgz
cd imagick-2.2.1/
phpize
./configure --with-imagick=/opt/local
make
sudo make install
sudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20060613/imagick.so /opt/local/lib/php/extensions
</code></pre></li>
</ol>

<p>And finally, you can then run LightTPD with the following. The <code>-D</code> flag tells lighttpd not to run in the background&#8211;you don&#8217;t need to use it:</p>

<pre><code>lighttpd -f /opt/local/etc/lighttpd/lighttpd.conf -D
</code></pre>

<p>You should then be able to visit a PHP file in your browser to test that it works. A simple test file would be:</p>

<pre><code>&lt;?php
$img = new Imagick('pic.jpg');
$img-&gt;rotateImage('#fff', 45);
header('Content-type: image/jpeg');
echo $img;
?&gt;
</code></pre>

<p>This is just a simple Imagick rotate on an image.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/11/22/php5-lighttpd-and-imagick-on-mac-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>syslogd slowing my mac to a crawl</title>
		<link>http://davidwinter.me.uk/articles/2008/09/04/syslogd-slowing-my-mac-to-a-crawl/</link>
		<comments>http://davidwinter.me.uk/articles/2008/09/04/syslogd-slowing-my-mac-to-a-crawl/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 21:46:42 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=98</guid>
		<description><![CDATA[For the last few days, I&#8217;ve noticed my Mac getting slower, and slower, and slower. To the point where my mouse was jerking about all over the place, and where I was considering smashing my head against the wall next to me. Opening up Activity Monitor showed that the syslogd and mount_hfs processes were hogging [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few days, I&#8217;ve noticed my Mac getting slower, and slower, and slower. To the point where my mouse was jerking about all over the place, and where I was considering smashing my head against the wall next to me.</p>

<p>Opening up Activity Monitor showed that the <code>syslogd</code> and <code>mount_hfs</code> processes were hogging up both of my CPU cores. One each. The greedy bastards.</p>

<p>A little googling, and I found that deleting the file /var/log/asl.db seems to solve the problem. So far, my Mac seems to be speeding along quite merily now, but I&#8217;ll give it a few days before confirming mission accomplished.</p>

<ol>
<li>Restart your Mac.</li>
<li>When at the login screen, enter your password, then hold down shift and login. This will prevent your startup items from launching.</li>
<li><p>Open Terminal.app and enter the following (at your own risk!!):</p>

<pre><code>sudo launchctl stop com.apple.syslogd
sudo rm /var/log/asl.db
sudo launchctl start com.apple.syslogd
</code></pre></li>
<li><p>Logout, and then log back in again.</p></li>
</ol>

<p><strong>Update:</strong> That didn&#8217;t last long :( It had been zipping along so much faster, but it just started happening again. I&#8217;m trying to restart now, but I&#8217;ve just got the spinner on screen, and fear that I&#8217;m now going to have to force power off. I hope my <a href="http://www.drobo.com/">Drobo</a> turns up asap so I can have a decent backup of my stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/09/04/syslogd-slowing-my-mac-to-a-crawl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extracted Enhanced Podcast Files</title>
		<link>http://davidwinter.me.uk/articles/2008/08/16/extracted-enhanced-podcast-files/</link>
		<comments>http://davidwinter.me.uk/articles/2008/08/16/extracted-enhanced-podcast-files/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 16:37:37 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[podcasts]]></category>
		<category><![CDATA[quicktime]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=97</guid>
		<description><![CDATA[I finally found a way to extract the XML files from enhanced podcasts that handle chapters and links. Open up the podcast file in Quicktime.app Window > Show Movie Properties Select the first &#8216;Text Track&#8217; and ensure it is enabled. File > Export Select the &#8216;Text to QuickTime TeXML&#8217; format You should then have a [...]]]></description>
			<content:encoded><![CDATA[<p>I finally found a way to extract the XML files from enhanced podcasts that handle chapters and links.</p>

<ol>
<li>Open up the podcast file in Quicktime.app</li>
<li>Window > Show Movie Properties</li>
<li>Select the first &#8216;Text Track&#8217; and ensure it is enabled. </li>
<li>File > Export</li>
<li>Select the &#8216;Text to QuickTime TeXML&#8217; format</li>
</ol>

<p>You should then have a lovely XML file. Just need to figure a way to parse the files to get the simple stuff out. Like when to display a link/when a chapter starts, and grab the link/chapter name.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/08/16/extracted-enhanced-podcast-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merge video files with mencoder</title>
		<link>http://davidwinter.me.uk/articles/2008/05/17/merge-video-files-with-mencoder/</link>
		<comments>http://davidwinter.me.uk/articles/2008/05/17/merge-video-files-with-mencoder/#comments</comments>
		<pubDate>Sat, 17 May 2008 19:48:04 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mencoder]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=95</guid>
		<description><![CDATA[To merge video files together with mencoder is simple: mencoder -oac copy -ovc copy file1.avi file2.avi file3.avi -o full_movie.avi]]></description>
			<content:encoded><![CDATA[<p>To merge video files together with <code>mencoder</code> is simple:</p>

<pre><code>mencoder -oac copy -ovc copy file1.avi file2.avi file3.avi -o full_movie.avi
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/05/17/merge-video-files-with-mencoder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mac OS X/HFS+ case-insensitive? Why?</title>
		<link>http://davidwinter.me.uk/articles/2008/05/17/mac-os-xhfs-case-insensitive-why/</link>
		<comments>http://davidwinter.me.uk/articles/2008/05/17/mac-os-xhfs-case-insensitive-why/#comments</comments>
		<pubDate>Sat, 17 May 2008 16:04:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/?p=94</guid>
		<description><![CDATA[I just found out that HFS+, the preferred file system for Mac OS X, is case-insensitive when it comes to files and directories. I don&#8217;t understand why? It&#8217;s sure as hell causing issues with stuff I&#8217;m copying from my Ubuntu PC. Just seems like a dumb idea.]]></description>
			<content:encoded><![CDATA[<p>I just found out that HFS+, the preferred file system for Mac OS X, is case-insensitive when it comes to files and directories. I don&#8217;t understand why? It&#8217;s sure as hell causing issues with stuff I&#8217;m copying from my Ubuntu PC.</p>

<p>Just seems like a dumb idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/05/17/mac-os-xhfs-case-insensitive-why/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Convert a Binary Property List to XML</title>
		<link>http://davidwinter.me.uk/articles/2008/02/16/convert-a-binary-property-list-to-xml/</link>
		<comments>http://davidwinter.me.uk/articles/2008/02/16/convert-a-binary-property-list-to-xml/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 22:11:56 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bplist]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[plist]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2008/02/16/convert-a-binary-property-list-to-xml/</guid>
		<description><![CDATA[Since Mac OS X Tiger 10.4, preference files for applications have been stored as binary property lists. This really reduces the file size for preferences, and makes application access a lot faster. However, if you ever want to read the file as XML, you&#8217;ll need to convert it. plutil -convert xml1 path/to/preferences.plist Now open the [...]]]></description>
			<content:encoded><![CDATA[<p>Since Mac OS X Tiger 10.4, preference files for applications have been stored as binary property lists. This really reduces the file size for preferences, and makes application access a lot faster. However, if you ever want to read the file as XML, you&#8217;ll need to convert it.</p>

<pre><code>plutil -convert xml1 path/to/preferences.plist
</code></pre>

<p>Now open the file and it&#8217;ll be in beautiful, human readable, XML.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2008/02/16/convert-a-binary-property-list-to-xml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
