<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>michaelkrol.com</title>
	<link>http://michaelkrol.com</link>
	<description>Personal blog of Michael Krol</description>
	<pubDate>Fri, 18 Jul 2008 18:20:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Set media=print Using The CakePHP CSS HtmlHelper</title>
		<link>http://michaelkrol.com/2008/07/18/set-mediaprint-using-cakephp-css-helper/</link>
		<comments>http://michaelkrol.com/2008/07/18/set-mediaprint-using-cakephp-css-helper/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 18:17:22 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[CakePHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2008/07/18/set-mediaprint-using-cakephp-css-helper/</guid>
		<description><![CDATA[It seemed so simple, yet it took forever to figure this one out. I&#8217;ve been using CakePHP for several projects lately, and I&#8217;m really enjoying using it. But much of the documentation is lacking. Luckily there are plenty of blogs detailing the progress of this framework and what can be done with it. But I [...]]]></description>
			<content:encoded><![CDATA[<p>It seemed so simple, yet it took forever to figure this one out. I&#8217;ve been using <a href="http://cakephp.org" title="CakePHP" target="_blank">CakePHP</a> for several projects lately, and I&#8217;m really enjoying using it. But much of the documentation is lacking. Luckily there are plenty of blogs detailing the progress of this framework and what can be done with it. But I searched in vain for quite a while on how to create a link to a css file and designate it for &#8220;print&#8221; only.</p>
<p>Here&#8217;s how to create a link to a stylesheet and set the media type to &#8220;print&#8221;:</p>
<p><code>$html-&gt;css(array('filename'), 'stylesheet', array('media' =&gt; 'print'));</code></p>
<p>That will output the following code:</p>
<p><code>&lt;link href="/css/filename.css" rel="stylesheet" type="text/css" media="print" /&gt;</code></p>
<p>Hope that helps the next person trying to figure this one out.</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=24&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_24" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2008/07/18/set-mediaprint-using-cakephp-css-helper/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hidden Files in OS X Finder - No Terminal Hacking With Path Finder</title>
		<link>http://michaelkrol.com/2007/12/21/hidden-files-in-os-x-finder-no-terminal-hacking-with-path-finder/</link>
		<comments>http://michaelkrol.com/2007/12/21/hidden-files-in-os-x-finder-no-terminal-hacking-with-path-finder/#comments</comments>
		<pubDate>Sat, 22 Dec 2007 00:27:36 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[OS X]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/12/21/hidden-files-in-os-x-finder-no-terminal-hacking-with-path-finder/</guid>
		<description><![CDATA[I posted a way to show hidden files in OS X&#8217;s Finder a while back and have found a much better option that I thought I&#8217;d share. Path Finder from cocoatech is an amazing app, and even with the improvements to the Finder in Leopard, Path Finder still blows it out of the water. Five [...]]]></description>
			<content:encoded><![CDATA[<p>I posted a way to <a href="/2007/10/01/show-hidden-files-in-os-x-finder/">show hidden files in OS X&#8217;s Finder</a> a while back and have found a much better option that I thought I&#8217;d share. <a href="http://cocoatech.com/pf4/">Path Finder</a> from <a href="http://cocoatech.com/">cocoatech</a> is an amazing app, and even with the improvements to the Finder in Leopard, Path Finder still blows it out of the water. Five reasons I can&#8217;t live without it:</p>
<p>1) <strong>Show Hidden Files</strong>. This is huge when you&#8217;re working with a website that requires the .htaccess file or editing system files without the Terminal. If I want to copy a folder or group of files while ignoring .DS_Store files and .svn (<a href="http://subversion.tigris.org/">Subversion</a>) files, the Finder is great. But .htaccess is going to be left behind too. Path Finder shows and hides system files with a simple &#8220;show invisibles&#8221; checkbox.</p>
<p>2) <strong>Those Relentless .DS_Store Files</strong>. Sure, they tell the finder what font size, color or format to show each unique finder window in, but come on&#8230; do we REALLY need this written in every folder the Finder touches whether we change the layout or not? I hate clutter. Even if it&#8217;s invisible clutter. Path Finder shows folders without adding a .DS_Store file to tell you it&#8217;s been there.</p>
<p>3) <strong>Compressing Folders</strong>. Have you ever opened one of those .zip files you&#8217;re sending your PC friends that you compressed from the Finder? They&#8217;re filled with all kinds of extra junk that you can&#8217;t see on a Mac, but confuses the hell out of someone on a PC who&#8217;s looking at two versions of every file in the folder (a hidden __MACOSX folder contains duplicates (0 or 1KB versions) of every file - most likely meta data about each file). Path Finder compresses folders without adding&#8230; whatever that is that the Finder adds.</p>
<p>4) <strong>Tabs</strong>. Tabs&#8230; hello, Apple? TABS!! They&#8217;re everywhere now. They should be on the Finder too. Even my toaster has tabs now.</p>
<p>5) <strong>Sort Folders First</strong>. If I had to choose one thing I miss from my days on Windows, it would be that the Windows Explorer always sorted folders first, and then files. I always found it hard to quickly find things in the Finder with folders and files all jumbled together (sorting by &#8220;Kind&#8221; fixes this&#8230; sort of). Path Finder brings that back, and it&#8217;s oh so nice.</p>
<p>Another nice feature (I could go on with 20 more of these, but I won&#8217;t) is something they call the &#8220;Drop Stack.&#8221; It&#8217;s a magical place where you can put files&#8230; almost like a little favorites drawer, to access quickly, or burn to a CD, without creating a folder on the Desktop for them.</p>
<p>So I suggest you check out <a href="http://cocoatech.com/download.php">Path Finder</a> - it&#8217;s well worth the $35 you&#8217;ll shell out for it.</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=23&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_23" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/12/21/hidden-files-in-os-x-finder-no-terminal-hacking-with-path-finder/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Local Web Development With OS X 10.5 (Leopard)</title>
		<link>http://michaelkrol.com/2007/10/30/local-web-development-with-os-x-105-leopard/</link>
		<comments>http://michaelkrol.com/2007/10/30/local-web-development-with-os-x-105-leopard/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 05:28:50 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Apache]]></category>

		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/10/30/local-web-development-with-os-x-105-leopard/</guid>
		<description><![CDATA[With the release of Leopard last Friday, it appears the bulk of my previous tutorials are now taken care of out of the box. mod_rewrite is enabled by default, and a decent (but not robust) installation of PHP 5.2.4 is ready to go - it only needs to be uncommented in the Apache configuration file.
The [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of Leopard last Friday, it appears the bulk of my <a href="http://michaelkrol.com/2005/11/21/enable-mod_rewrite-on-os-x-104-tiger/" title="mod_rewrite on OS X 10.4">previous</a> <a href="http://michaelkrol.com/2007/10/04/save-time-and-code-using-virtual-hosts-for-local-os-x-web-development-with-mod_rewrite/" title="Local Web Development With OS X 10.4">tutorials</a> are now taken care of out of the box. mod_rewrite is enabled by default, and a decent (but not robust) installation of PHP 5.2.4 is ready to go - it only needs to be uncommented in the Apache configuration file.</p>
<p>The PHP installation is missing some key extensions, like PostgreSQL support and the GD library to name a few. But the majority of commonly used extensions are ready to go. <a href="http://www.entropy.ch/blog/Mac+OS+X/2007/10/30/Leopard-Four-Way-Universal-Binaries.html" title="Marc Liyanage">Marc Liyanage</a> is already on the case and working out the kinks for his own installer including those additions. The only thing missing at this point is <a href="http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg">MySQL support</a> for Leopard. As of this writing, there is no installer available yet.</p>
<p>The rest of this post assumes you are working from a clean install or an &#8220;archive and install&#8221; of 10.5. I&#8217;m not sure what the Apache configuration files may look like if you simply upgraded from 10.4 or 10.3 - if they are clean this should work just fine.</p>
<p>Open the Apache configuration file (I&#8217;m using <a href="http://macromates.com/" title="TextMate">TextMate</a>, which is where the &#8216;mate&#8217; command comes from):<br />
<code>$ mate /etc/apache2/httpd.conf</code><br />
and scroll to line 114 - it should look like this:<br />
<code>#LoadModule php5_module        libexec/apache2/libphp5.so</code><br />
Just remove the comment:<br />
<code>LoadModule php5_module        libexec/apache2/libphp5.so</code></p>
<p>To enable Virtual Hosts, uncomment line 461:<br />
<code>Include /private/etc/apache2/extra/httpd-vhosts.conf</code><br />
and add your own directories in your <code>/etc/apache2/users/you.conf</code> file. Similar to the 10.4 configuration, change the first two lines (inside <code>&lt;Directory "/Users...&gt;</code>) like so:<br />
<code>Options All<br />
AllowOverride All</code><br />
and add your Virtual Host directives after that:</p>
<p><code>&lt;VirtualHost *:80&gt;<br />
DocumentRoot /Users/yourname/Sites<br />
ServerName localhost<br />
&lt;/VirtualHost&gt;</code></p>
<p><code>&lt;VirtualHost *:80&gt;<br />
DocumentRoot /Users/yourname/Sites/devsite<br />
ServerName devsite<br />
&lt;/VirtualHost&gt;</code></p>
<p>Restart Apache:<br />
<code>$ sudo apachectl restart</code><br />
and you&#8217;re all set.</p>
<p>The only thing left to do is update your hosts file:<br />
<code>$ mate /etc/hosts</code><br />
and add whatever you used for your ServerName after the other entries:<br />
<code>127.0.0.1  devsite</code></p>
<p>Enjoy!</p>
<p>Now I need to figure out if those <a href="http://weblog.rubyonrails.org/2006/8/7/ruby-on-rails-will-ship-with-os-x-10-5-leopard" title="Ruby on Rails in OS 10.5?">rumors</a> of Ruby on Rails out of the box are true&#8230;</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=21&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_21" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/10/30/local-web-development-with-os-x-105-leopard/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Save Time (and code) Using Virtual Hosts For Local OS X Web Development With mod_rewrite</title>
		<link>http://michaelkrol.com/2007/10/04/save-time-and-code-using-virtual-hosts-for-local-os-x-web-development-with-mod_rewrite/</link>
		<comments>http://michaelkrol.com/2007/10/04/save-time-and-code-using-virtual-hosts-for-local-os-x-web-development-with-mod_rewrite/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 06:38:33 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Apache]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/10/04/save-time-and-code-using-virtual-hosts-for-local-os-x-web-development/</guid>
		<description><![CDATA[UPDATE: This tutorial was written for OS X 10.4 and parts of it are no longer necessary with OS X 10.5. See this post for details.
Using a few built-in tools in OS X, I&#8217;ve found a great way to develop sites as Virtual Hosts on Apache. If you are a web developer working on a [...]]]></description>
			<content:encoded><![CDATA[<p style="border: 1px solid #000000; padding: 3px; background-color: #F7F7F7">UPDATE: This tutorial was written for OS X 10.4 and parts of it are no longer necessary with OS X 10.5. See <a href="http://michaelkrol.com/2007/10/30/local-web-development-with-os-x-105-leopard/" title="Local Web Development With OS X 10.5 Leopard">this post</a> for details.</p>
<p>Using a few built-in tools in OS X, I&#8217;ve found a great way to develop sites as Virtual Hosts on Apache. If you are a web developer working on a Mac and you need to develop sites using root relative paths without adding a <code>base href</code> tag to every page on your site, this tutorial should help tremendously. Here&#8217;s how it works:</p>
<p>First, make sure you&#8217;ve got <a href="http://www.entropy.ch/software/macosx/php/" title="Marc Liyanage's PHP Installer" target="_blank">PHP</a> and <a href="http://dev.mysql.com/downloads/" title="MySQL Download Page" target="_blank">MySQL</a> installed - those are the only two things you should need to install outside of the stock OS X configuration.</p>
<p>Next, follow <a href="http://michaelkrol.com/2005/11/21/enable-mod_rewrite-on-os-x-104-tiger/" title="OS X mod_rewrite Fix" target="_blank">this tutorial</a> on enabling mod_rewrite on OS X that I&#8217;ve written previously.</p>
<p>The rest will involve some basic command line use, but it&#8217;s pretty painless. As mentioned in the <a href="http://michaelkrol.com/2005/11/21/enable-mod_rewrite-on-os-x-104-tiger/" title="OS X mod_rewrite Fix" target="_blank">mod_rewrite tutorial</a>, I highly recommend <a href="http://macromates.com/" title="TextMate" target="_blank">TextMate</a> for editing the configuration files. If you&#8217;re a UNIX purist, there&#8217;s always <a href="http://en.wikipedia.org/wiki/Vi" title="vi text editor" target="_blank">vi</a>.</p>
<p>For this example, create a new folder in your <code>/Users/yourname/Sites</code> folder called <code>devsite</code> and place some files there (a simple html or php file with something to output in a browser will do).</p>
<ol>
<li>Open your <code>httpd.conf</code> file and enable Virtual Hosts:<br />
<code>$ mate /etc/httpd/httpd.conf</code><br />
Around line 1063 (almost at the bottom of the file),  you should find and uncomment this line:<br />
<code>NameVirtualHost *:80</code></li>
<li>Open your users.conf file and add a Virtual Host directive:<br />
<code>$ mate /etc/httpd/users/yourname.conf</code><br />
After the <code>&lt;Directory&gt;...&lt;/Directory&gt;</code> portion, add the following:</p>
<p><code>&lt;VirtualHost *:80&gt;<br />
DocumentRoot /Users/yourname/Sites<br />
ServerName localhost<br />
&lt;/VirtualHost&gt;</code></p>
<p><code>&lt;VirtualHost *:80&gt;<br />
DocumentRoot /Users/yourname/Sites/devsite<br />
ServerName devsite<br />
&lt;/VirtualHost&gt;</code></p>
<p>Keeping the <code>localhost</code> portion at the top will still allow you to view the root of the server and anything in it&#8217;s directory at <em>http://localhost</em>.</li>
<li>Open your <code>hosts</code> file and add your new site name to bypass DNS:<br />
<code>$ mate  /etc/hosts</code><br />
Make sure these three lines stay at the top:<br />
<code>127.0.0.1                localhost<br />
255.255.255.255    broadcasthost<br />
::1                            localhost</code><br />
And add this line after it:<br />
<code>127.0.0.1                devsite</code></li>
<li>Restart Apache<br />
<code>$ sudo apachectl restart</code></li>
</ol>
<p>You can now view your local files in your browser at <a href="http://devsite" title="This link will only work AFTER you finish the tutorial">http://devsite</a>.</p>
<p>Let&#8217;s step back and look at what we&#8217;ve done and why this is so useful.</p>
<p>Most likely, until now, you were viewing local development sites by going to something like <em>http://localhost/~yourname/devsite/fancy/url</em> (or <em>127.0.0.1</em> instead of <em>localhost</em>) and doing anything with mod_rewrite meant lots of <code>base href</code> tags and <code>RewriteBase</code> configurations, which in turn meant lots of ../../ paths before your images or included scripts to make things work. Now, viewing the same files in your browser is as easy as <em>http://devsite/fancy/url</em> and all of your paths can begin with a single slash ( / ) meaning it will still work the same when you migrate your site to the live server. Root relative paths are a life saver - and this setup makes it possible.</p>
<p>It&#8217;s also useful for quick access to commonly used tools, like <a href="http://phpmyadmin.net" title="phpMyAdmin" target="_blank">phpMyAdmin</a>. What I&#8217;ve done is install phpMyAdmin in /Users/me/Sites/phpMyAdmin and set up a Virtual Host like this:</p>
<p><code>&lt;VirtualHost *:80&gt;<br />
DocumentRoot /Users/me/Sites/phpMyAdmin<br />
ServerName admin<br />
&lt;/VirtualHost&gt;</code></p>
<p>In the <code>/etc/hosts</code> file:<br />
<code>127.0.0.1    admin</code></p>
<p>And I can always get to my phpMyAdmin install by simply typing <em>http://admin</em> into the browser.</p>
<p>The reason <em>http://admin</em> works is because most operating systems (even Windows!) will look at the local <code>hosts</code> file first before requesting information from DNS servers. Apache is told to handle requests to <em>http://admin</em> through the Virtual Host we set up. And all of this is done without www&#8217;s or .com&#8217;s.</p>
<p>By now you should realize that you can add as many Virtual Hosts as you like for as many sites as you need. All you need is these three commands:<br />
<code>$ mate /etc/httpd/users/yourname.conf<br />
$ mate /etc/hosts<br />
$ sudo apachectl restart</code></p>
<p>This can also be done on Windows, but it takes a little more work, and would of course work the same as described above on Linux/UNIX. If anyone would find it useful, let me know and I&#8217;ll post a new tutorial on the same method for Windows developers.</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=20&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_20" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/10/04/save-time-and-code-using-virtual-hosts-for-local-os-x-web-development-with-mod_rewrite/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Show Hidden Files in OS X&#8217;s Finder</title>
		<link>http://michaelkrol.com/2007/10/01/show-hidden-files-in-os-x-finder/</link>
		<comments>http://michaelkrol.com/2007/10/01/show-hidden-files-in-os-x-finder/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 04:31:22 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[Apache]]></category>

		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/10/01/show-hidden-files-in-finder/</guid>
		<description><![CDATA[In web development on the Apache web server, a common configuration file used in nearly every site we build is the .htaccess file. But in OS X, you can&#8217;t see it in the Finder - hidden files (files which start with a dot &#8220;.&#8221;) are unavailable unless you use the Unix command line. I did [...]]]></description>
			<content:encoded><![CDATA[<p>In web development on the Apache web server, a common configuration file used in nearly every site we build is the <a href="http://en.wikipedia.org/wiki/Htaccess" title=".htaccess on Wikipedia">.htaccess</a> file. But in OS X, you can&#8217;t see it in the Finder - hidden files (files which start with a dot &#8220;.&#8221;) are unavailable unless you use the Unix command line. I did some digging around and found a way to enable hidden files in the Finder - which, ironically involves using the command line to get there.</p>
<p>Open the Terminal application (or, I much prefer <a href="http://iterm.sourceforge.net/" title="iTerm terminal emulation program">iTerm</a>) and type the following:<br />
<code>defaults write com.apple.finder AppleShowAllFiles TRUE</code><br />
and after hitting return, follow it up with<br />
<code>killall Finder</code><br />
which restarts the Finder and shows all files.</p>
<p><img src="http://michaelkrol.com/wp-content/uploads/2007/10/hidden_files_in_finder.jpg" alt="Hidden files in the OS X Finder" /></p>
<p>To revert back to hiding those files, simply run the same command above again but change <code>TRUE</code> to <code>FALSE</code></p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=18&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_18" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/10/01/show-hidden-files-in-os-x-finder/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tell Your iPhone to Stop Opening iPhoto!</title>
		<link>http://michaelkrol.com/2007/09/13/tell-your-iphone-to-stop-opening-iphoto/</link>
		<comments>http://michaelkrol.com/2007/09/13/tell-your-iphone-to-stop-opening-iphoto/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 05:50:42 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/09/13/tell-your-iphone-to-stop-opening-iphoto/</guid>
		<description><![CDATA[Every time I plugged in my iPhone, it had this nasty habit of opening iPhoto for me. Not because it wanted to drive me to drink, but because iPhoto is set to open any time a digital camera is connected to my computer - which, technically, an iPhone is.
To stop this behavior, you won&#8217;t find [...]]]></description>
			<content:encoded><![CDATA[<p>Every time I plugged in my iPhone, it had this nasty habit of opening iPhoto for me. Not because it wanted to drive me to drink, but because iPhoto is set to open any time a digital camera is connected to my computer - which, technically, an iPhone is.</p>
<p>To stop this behavior, you won&#8217;t find any preference in iTunes or iPhoto, where you would normally think to look. This little gem can be found in a separate application in your Applications folder called Image Capture.</p>
<p>Open Image Capture and go to the Preferences menu (under the Image Capture menu item). Under the General tab, change the option for &#8220;When a camera is connected&#8230;&#8221; to &#8220;No Application&#8221; instead of &#8220;iPhoto&#8221;.</p>
<p><img src="http://michaelkrol.com/wp-content/uploads/2007/09/imagecaptureprefs.gif" alt="Image Capture Preferences" /></p>
<p>This means you&#8217;ll have to manually start iPhoto when you connect your digital camera, but you won&#8217;t have to <strong>CLOSE</strong> iPhoto every time you plug in your iPhone (which, for me, is a heck of a lot more often than plugging in a camera!)</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=15&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_15" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/09/13/tell-your-iphone-to-stop-opening-iphoto/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Change Your Domain Name and Keep Your Incoming Links With .htaccess And mod_rewrite</title>
		<link>http://michaelkrol.com/2007/09/12/change-your-domain-name-and-keep-your-incoming-links-with-htaccess/</link>
		<comments>http://michaelkrol.com/2007/09/12/change-your-domain-name-and-keep-your-incoming-links-with-htaccess/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 20:56:06 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Apache]]></category>

		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/09/12/change-your-domain-name-and-keep-your-incoming-links-with-htaccess/</guid>
		<description><![CDATA[When moving our site from ablogapart.org to michaelkrol.com, this handy little bit helped move our entire website with four lines of code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)ablogapart.org [NC]
RewriteRule ^(.*)$ http://michaelkrol.com/$1 [R=301,L]
This reference was extremely helpful.
This RewriteRule lives in the .htaccess file at ablogapart.org and tells any request coming in to that domain to swap ablogapart.org out [...]]]></description>
			<content:encoded><![CDATA[<p>When moving our site from ablogapart.org to michaelkrol.com, this handy little bit helped move our entire website with four lines of code:</p>
<p><code>Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteCond %{HTTP_HOST} ^(.*)ablogapart.org [NC]<br />
RewriteRule ^(.*)$ http://michaelkrol.com/$1 [R=301,L]</code></p>
<p><a href="http://www.ilovejackdaniels.com/cheat-sheets/mod_rewrite-cheat-sheet/" title="mod_rewrite cheat sheet" target="_blank">This reference</a> was extremely helpful.</p>
<p>This RewriteRule lives in the .htaccess file at ablogapart.org and tells any request coming in to that domain to swap <em>ablogapart.org</em> out and replace it with <em>michaelkrol.com</em>. This includes ANYTHING after the trailing slash, like a direct link to a previous post. So http://ablogapart.org/this/direct/link gets sent properly to http://michaelkrol.com/this/direct/link</p>
<p>The important part is the <code>[R=301]</code> which sends a 301 (Permanent) Redirect header. That tells search engines that the page has moved permanently.</p>
<p>Just imagine what you&#8217;d have to go through setting up individual forwarding links&#8230;</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=14&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_14" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/09/12/change-your-domain-name-and-keep-your-incoming-links-with-htaccess/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We&#8217;ve Moved!</title>
		<link>http://michaelkrol.com/2007/09/12/weve-moved/</link>
		<comments>http://michaelkrol.com/2007/09/12/weve-moved/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 20:46:34 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/2007/09/12/weve-moved/</guid>
		<description><![CDATA[Well, virtually, that is. If you&#8217;ve found yourself here after going to ablogapart.org, fear not - you&#8217;re in the right place. It was time to bring some focus - to who this is and why I&#8217;m doing this - and start adding some meaningful posts. The important ones have been migrated over to the new [...]]]></description>
			<content:encoded><![CDATA[<p>Well, virtually, that is. If you&#8217;ve found yourself here after going to ablogapart.org, fear not - you&#8217;re in the right place. It was time to bring some focus - to who this is and why I&#8217;m doing this - and start adding some meaningful posts. The important ones have been migrated over to the new site, while others weren&#8217;t quite relevant enough to carry on. More helpful info on the way&#8230;</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=13&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_13" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/09/12/weve-moved/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nettica &#8217;safeguard.php&#8217; Hoax</title>
		<link>http://michaelkrol.com/2007/02/15/nettica-safeguardphp-hoax/</link>
		<comments>http://michaelkrol.com/2007/02/15/nettica-safeguardphp-hoax/#comments</comments>
		<pubDate>Thu, 15 Feb 2007 18:35:33 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[Security]]></category>

		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/?p=12</guid>
		<description><![CDATA[This morning I received an email hoax purporting to be from Nettica, our DNS provider. Details aren&#8217;t clear yet on what it&#8217;s intent was (the attached file was encrypted, which we&#8217;re working on decrypting), but I&#8217;ll post an update as soon as we figure it out. We&#8217;re working with Nettica Support to find out what&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>This morning I received an email hoax purporting to be from Nettica, our DNS provider. Details aren&#8217;t clear yet on what it&#8217;s intent was (the attached file was encrypted, which we&#8217;re working on decrypting), but I&#8217;ll post an update as soon as we figure it out. We&#8217;re working with Nettica Support to find out what&#8217;s going on.</p>
<p>The email instructions appear to be referencing a Plesk installation.</p>
<p>Here&#8217;s a copy of the email that was sent in case anyone else receives it:</p>
<hr />Dear Nettica Inc. valued MembersRegarding our new security regulations, as a part of our yearly maintenance we have provided a security guard script in the attachment.So, to secure your websites, please use the attached file and (for UNIX/Linux Based servers) upload the file &#8220;safeguard.php&#8221; in: &#8220;./public_html&#8221; or (for Windows Based servers) in: &#8220;./wwwroot&#8221; in your site.If you do not know how to use it, you can use the following instruction:For Unix/Linux or Windows based websites that use PHP/CGI/PERL/ASP:<br />
1) Download the attachment named &#8220;safeguard.php&#8221;<br />
2) Login to your site Control panel.<br />
3) Open &#8220;File Manager&#8221; window.<br />
4) Go through &#8220;Public_html&#8221; or &#8220;htdocs&#8221; (for UNIX/Linux Based servers), but for Windows Based server, please Go through &#8220;wwwroot&#8221; directory.<br />
5) Choose &#8220;Upload Files&#8221;<br />
6) Upload the file &#8220;safeguard.php&#8221;<br />
7) Check its URL too &#8220;http://www.yoursite.com/safeguard.php&#8221;, if it is okThank you for using our services and products. We look forward to providing you with a unique and high quality service.</p>
<p>Best Regards</p>
<p>Nettica Inc.</p>
<hr />[UPDATE] Nettica has added a post about this <a href="http://news.nettica.com/2007/02/customer-alert-spoofed-emails.html" title="Nettica Hoax" target="_blank">on their blog</a> as well.</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=12&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_12" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2007/02/15/nettica-safeguardphp-hoax/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Creating a MySQL Dump File From an External Database</title>
		<link>http://michaelkrol.com/2006/03/16/creating-a-mysql-dump-file-from-an-external-database/</link>
		<comments>http://michaelkrol.com/2006/03/16/creating-a-mysql-dump-file-from-an-external-database/#comments</comments>
		<pubDate>Thu, 16 Mar 2006 19:20:34 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
		
		<category><![CDATA[Web Development]]></category>

		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://michaelkrol.com/?p=11</guid>
		<description><![CDATA[I needed to export a MySQL database that was on a different server than the web server and was bound and determined to do it without going through the hassle of installing phpMyAdmin (port 3306 was blocked as well, so I couldn&#8217;t use any GUI tools either). The trick was adding the -h option. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to export a MySQL database that was on a different server than the web server and was bound and determined to do it without going through the hassle of installing phpMyAdmin (port 3306 was blocked as well, so I couldn&#8217;t use any GUI tools either). The trick was adding the <code>-h</code> option. Here&#8217;s the command line that made some magic:</p>
<p><code>mysqldump -u username -p -h dbserver.host.com --compatible=mysql40 dbname &gt; filetosave.sql</code></p>
<p>The <code>--compatible</code> command was added because the database server was running MySQL 4.1 and we needed the export for MySQL 4.0.</p>
<p class="akst_link"><a href="http://michaelkrol.com/?p=11&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_11" class="akst_share_link" rel="nofollow">Share This</a>
</p>]]></content:encoded>
			<wfw:commentRss>http://michaelkrol.com/2006/03/16/creating-a-mysql-dump-file-from-an-external-database/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
