<?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>SickBiscuit &#187; Mac</title>
	<atom:link href="http://sickbiscuit.com/blog/category/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://sickbiscuit.com/blog</link>
	<description>The personal blog of Steven Wilkin</description>
	<lastBuildDate>Sun, 27 Jun 2010 21:52:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Back in Mac</title>
		<link>http://sickbiscuit.com/blog/2007/10/27/back-in-mac/</link>
		<comments>http://sickbiscuit.com/blog/2007/10/27/back-in-mac/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 15:34:43 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Infurious]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/2007/10/27/back-in-mac/</guid>
		<description><![CDATA[I&#8217;m writing this on the shiny iMac Matt dropped off the other night. As it stood, I was the only guy in Infurious not on the Mac platform, which is a pretty fundamental prerequisite for working in a Mac shop, don&#8217;t you think?
I&#8217;m having to get re-used to the keyboard again and the mouse is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing this on the shiny iMac <a href="http://cimota.com/blog/">Matt</a> dropped off the other night. As it stood, I was the only guy in <a href="http://infurious.com/">Infurious</a> not on the Mac platform, which is a pretty fundamental prerequisite for working in a Mac shop, don&#8217;t you think?</p>
<p>I&#8217;m having to get re-used to the keyboard again and the mouse is giving me some difficulty which might just be due to the mouse itself, but all-in-all it&#8217;s been a not-unpleasant experience so far!</p>
<p>I&#8217;d forgotten how <em>elegant</em> the whole Mac lifestyle is. I&#8217;m used to Linux on my desktop and so I&#8217;m accustomed to a certain degree of clunkiness and things not always working the way I&#8217;d like. Not to mention that I have to use Windows 2000 during the 9 to 5, so it&#8217;s been like a breath of fresh air, which makes the contrast even greater.</p>
<p>I do most of my work on Linux boxen via the command line, along with a web browser and a mail client, so at the end of the day I have a similar experience no matter which platform I&#8217;m on and through the magic of free software I can use pretty much the same applications which makes things even easier.</p>
<p>Now that I have the hardware, you never know, I might actually become a â€œMac Guyâ€ yet!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2007/10/27/back-in-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP predefined variables on BSD</title>
		<link>http://sickbiscuit.com/blog/2007/04/03/php-predefined-variables-on-bsd/</link>
		<comments>http://sickbiscuit.com/blog/2007/04/03/php-predefined-variables-on-bsd/#comments</comments>
		<pubDate>Tue, 03 Apr 2007 10:51:38 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/2007/04/03/php-predefined-variables-on-bsd/</guid>
		<description><![CDATA[I&#8217;ve been getting ready for the deployment of wow4kids.com and one of the final features to be into place was restricting access to the administrative back-end.
I enabled admin routing in CakePHP and put all the back-end code into admin_* functions in my controller which are accessible via /admin/controller/action. I wanted to enable some form of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been getting ready for the deployment of <a href="http://wow4kids.com/">wow4kids.com</a> and one of the final features to be into place was restricting access to the administrative back-end.</p>
<p>I enabled <a href="http://blog.evansagge.com/2006/11/06/configure-cake_admin-routes-in-cakephp/">admin routing</a> in <a href="http://cakephp.org/">CakePHP </a>and put all the back-end code into <code>admin_*</code> functions in my controller which are accessible via /admin/<em>controller</em>/<em>action</em>. I wanted to enable some form of access control but without utilising a full user management system which would have been overkill.</p>
<p>The <code>/admin/</code> directory only exists through some <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite</a> magic so I couldn&#8217;t just use a simple <code>.htaccess</code> file. After much head-scratching and reading of documentation I arrived at a simple solution:</p>
<ol>
<li> I created a <code>.htaccess</code> protected directory, <code>/adminauth/</code></li>
<li> in this directory I created an <code>index.php</code> file which redirected to a URL passed to it via HTTP GET</li>
<li> in <code>/app/app_controller.php</code> I  defined a <code>beforeFilter()</code> function which uses a regular expression to determine if the called action contained â€œadmin_â€ in its name</li>
<li>if so, check if the <code>$_SERVER['AUTH_TYPE']</code> variable is set</li>
<li>redirect to <code>/adminauth/</code>, passing the current URL, if it isn&#8217;t set</li>
<li>let <a href="http://httpd.apache.org/docs/1.3/mod/mod_auth.html">mod_auth</a> take care of the rest</li>
</ol>
<p>This worked a charm on my home Linux box, but when it came to testing the code on the iMac the site is being developed on, the script couldn&#8217;t detect the <a href="http://uk2.php.net/manual/en/reserved.variables.php">server variable</a> and was thrown into an infinite loop of redirects, doh!</p>
<p>The same result was had when I uploaded the code to the <a href="http://pair.com/">FreeBSD web-host</a> the site will be deployed to, so I had no choice but to rethink my solution.</p>
<p>It was either going to be sessions or cookies and in the moment cookies seemed appealing. I changed the controller to check <code>$_COOKIE[]</code> instead of <code>$_SERVER[]</code> and <code>/adminauth/index.php</code> to call <code>setcookie()</code> . It seems to be working so far, fingers crossed it&#8217;ll be suitable for production purposes!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2007/04/03/php-predefined-variables-on-bsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTerm on OS X</title>
		<link>http://sickbiscuit.com/blog/2007/03/07/iterm-on-os-x/</link>
		<comments>http://sickbiscuit.com/blog/2007/03/07/iterm-on-os-x/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 17:10:56 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/2007/03/07/iterm-on-os-x/</guid>
		<description><![CDATA[Over the past week and a half I&#8217;ve been fine-tuning my Mac experience: getting used to the system in general, in particular the keyboard, and building up my arsenal of applications.
I&#8217;m not a Unix wizard, but I do make a lot of use of the command-line so I&#8217;m enjoying the underlying BSD-goodness of OS X [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past week and a half I&#8217;ve been fine-tuning my Mac experience: getting used to the system in general, in particular the keyboard, and building up my arsenal of applications.</p>
<p>I&#8217;m not a Unix wizard, but I do make a lot of use of the command-line so I&#8217;m enjoying the underlying BSD-goodness of OS X and multiple terminal sessions are a necessity: one to tunnel select local ports to my home slackware box via <code>ssh</code>, one to perform local operations and one to host a <code>screen</code> session on our development box.</p>
<p>I initially used <code>Terminal.app</code> but running several instances of it proved a bit fiddly: if I avoid cluttering my screen real-estate by minimising my terminals and then try to switch to one it isn&#8217;t automatically unminimised. Enter <a href="http://iterm.sourceforge.net/">iTerm</a>.</p>
<p>iTerm seems to solve my problem: it allows me to have multiple shells open and accessible via a single, tabbed interface without having to think about the implications of running a <code>screen</code> session within another <code>screen</code> session.</p>
<p>The only real difficulty I&#8217;ve had is the behavior of the arrow keys within <code>vim</code>, but after much head-scratching and googling <a href="http://www.wains.be/index.php/2007/02/16/my-review-of-mac-os-x/">this post</a> came to my rescue: I added <code>export TERM=dtterm</code> into my <code>~/.profile</code>, executed a quick <code>source ~/.profile</code><code></code> to make the changes active and went about my merry way.</p>
<p>A minor niggle is when I create a new tab: it&#8217;s background colour doesn&#8217;t seem to match up with that I specified in the preferences, but this seems to be fixed by going to View &gt;  Show Session Info and turning Transparency on and then off.</p>
<p>All in all, I&#8217;m adjusting and next on my agenda might well be looking into <a href="http://quicksilver.blacktree.com/">Quicksilver</a> and possibly <a href="http://virtuedesktops.info/">VirtueDesktops</a>. I still haven&#8217;t found out how to go to the start or the end of a line in <code>vim</code><code></code> without using ^ or $ in normal mode though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2007/03/07/iterm-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First post from OS X</title>
		<link>http://sickbiscuit.com/blog/2007/02/28/first-post-from-os-x/</link>
		<comments>http://sickbiscuit.com/blog/2007/02/28/first-post-from-os-x/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 22:22:24 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://sickbiscuit.com/blog/2007/02/28/first-post-from-os-x/</guid>
		<description><![CDATA[I&#8217;m composing this from the MacBook my new job has has provided me with. Coming from PC-land it&#8217;s a culture shock, a very sleek, stylised culture shock, but a culture shock none-the-less.
I&#8217;ve got a 2GHz Intel Core Duo processor along with 1.5 GB of RAM at my disposal, so everything is very smooth and shiny [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m composing this from the MacBook my new job has has provided me with. Coming from PC-land it&#8217;s a culture shock, a very sleek, stylised culture shock, but a culture shock none-the-less.</p>
<p>I&#8217;ve got a 2GHz Intel Core Duo processor along with 1.5 GB of RAM at my disposal, so everything is very smooth and shiny but I&#8217;m having to adjust to an operating system I&#8217;ve never used before so I feel almost crippled when it comes to doing things I don&#8217;t normally even have to think about. Oh, and the keyboard just seems <em>wrong</em>.</p>
<p>First thing I did when I got my new toy home was to set up wireless networking: before I put together an <a href="http://ipcop.org/">IPCop</a> router I was using  a <a href="http://www.gigabyte.com.tw/Products/Communication/Products_Spec.aspx?ClassValue=Communication&amp;ProductID=943&amp;ProductName=GN-B49G">Gigabyte GN-B49G</a> and had never used the wireless facility, but I plugged its WAN port into the switch for my â€œgreen zoneâ€ and went through the router&#8217;s setup wizard and bingo! As a finishing touch I configured it to use MAC authentication to prevent any of my lovely neighbours hi-jacking my bandwith <img src='http://sickbiscuit.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So far there has been nothing that has struck me with â€œah, this is what I&#8217;ve been missing all alongâ€ but I&#8217;m looking forward to adding another string to my bow, regardless of the amount of muscle memory I&#8217;m having to fight against to do anything via the keyboard. The only negative side I can see to using a Mac is that the experience might be a one-way thing and I&#8217;ll never be able to go back to commodity hardware. I&#8217;ll always have Linux running on my servers though!</p>
]]></content:encoded>
			<wfw:commentRss>http://sickbiscuit.com/blog/2007/02/28/first-post-from-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
