<?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>The Gippy Pages &#187; Code</title>
	<atom:link href="http://top-frog.com/category/works/code-works/feed/" rel="self" type="application/rss+xml" />
	<link>http://top-frog.com</link>
	<description>Polluting the internet since 2004</description>
	<lastBuildDate>Mon, 06 Sep 2010 06:39:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Excluding packages from MacPorts operations</title>
		<link>http://top-frog.com/2009/07/14/excluding-packages-from-macports-operations/</link>
		<comments>http://top-frog.com/2009/07/14/excluding-packages-from-macports-operations/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:59:33 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[exclude]]></category>
		<category><![CDATA[macports]]></category>

		<guid isPermaLink="false">http://top-frog.com/?p=822</guid>
		<description><![CDATA[As much as I&#8217;d like to jump whole hog on the PHP 5.3 bandwagon I just haven&#8217;t had the time to read up on the compatibility issues not work out what I&#8217;d need to do to maintain a PHP 5.2 and a PHP 5.3 environment on my computer. For now I&#8217;ll just be sticking with [...]]]></description>
			<content:encoded><![CDATA[<p>As much as I&#8217;d like to jump whole hog on the PHP 5.3 bandwagon I just haven&#8217;t had the time to read up on the compatibility issues not work out what I&#8217;d need to do to maintain a PHP 5.2 and a PHP 5.3 environment on my computer. For now I&#8217;ll just be sticking with PHP 5.2.x.</p>
<p>This creates a problem, though, as MacPorts constantly lists my PHP 5.2 as outdated. </p>
<p>While I don&#8217;t want to upgrade to PHP 5.3 right away, I still want to have a quick and easy upgrade of everything else that I have installed. There&#8217;s not any clear documentation about excluding ports from a port command, but there is a tasty morsel in the <code>port</code> man page.</p>
<p><span id="more-822"></span></p>
<blockquote><p>Logical operators &#8220;and&#8221;, &#8220;or&#8221;, &#8220;not&#8221;, &#8220;!&#8221;, &#8220;(&#8221; and &#8220;)&#8221; may be used to combine individual portnames, port glob patterns and/or pseudo-portnames to construct complex port expressions that expand to the set of matching ports. For example:</p>
<p>&nbsp;&nbsp;port upgrade installed and apache*<br />
&nbsp;&nbsp;port echo maintainer:jberry and uninstalled and \<br />
&nbsp;&nbsp;&nbsp;&nbsp;( category:java and not commons* )</p></blockquote>
<p>That means I can do this to exclude the PHP 5.3 upgrade until I&#8217;m ready:</p>
<p><div class="hl-wrapper"><div class="hl-main"><ol class="hl-main"><li>&nbsp;<span class="hl-identifier">sudo</span><span class="hl-code"> </span><span class="hl-identifier">port</span><span class="hl-code"> </span><span class="hl-identifier">upgrade</span><span class="hl-code"> </span><span class="hl-identifier">outdated</span><span class="hl-code"> </span><span class="hl-reserved">and</span><span class="hl-code"> </span><span class="hl-reserved">not</span><span class="hl-code"> </span><span class="hl-identifier">php</span><span class="hl-code">*</span></li></ol></div></div></p>
<p>A little less than optimal as I&#8217;d love to be able to modify a config file somewhere to effect this change on a global level but I&#8217;ll take this until that functionality gets added or until someone points me to where I might find that special config setting.</p>
<p>I could probably do something similar to <a href="/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix-aliases/">my svn pre-/post-commit client side hooks</a> hack, but I get the feeling that I&#8217;d forget about this one if I did it and end up cursing my computer later when it won&#8217;t install PHP 5.3 <img src='http://top-frog.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2009/07/14/excluding-packages-from-macports-operations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple, but handy .htaccess tricks</title>
		<link>http://top-frog.com/2009/07/10/simple-but-handy-htaccess-tricks/</link>
		<comments>http://top-frog.com/2009/07/10/simple-but-handy-htaccess-tricks/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 04:14:34 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[401]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[protect]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://top-frog.com/?p=794</guid>
		<description><![CDATA[These two have always been questions in my mind but until recently I&#8217;ve never had the need to actually put time in to satisfying my curiosity and as I look around I haven&#8217;t (easily) found any real world examples of these out there. So, we all know how to set up basic HTTP authentication, right? [...]]]></description>
			<content:encoded><![CDATA[<p>These two have always been questions in my mind but until recently I&#8217;ve never had the need to actually put time in to satisfying my curiosity and as I look around I haven&#8217;t (easily) found any real world examples of these out there.</p>
<p>So, we all know how to set up <a href="http://httpd.apache.org/docs/2.2/howto/auth.html">basic HTTP authentication</a>, right? Good. Here we go&hellip;</p>
<p><span id="more-794"></span></p>
<p class="error"><strong>Please re-read this post. It has been corrected for erroneous information!</strong></p>
<p>You might have something like this in your <code>.htaccess</code> file:</p>
<p><div class="hl-wrapper"><div class="hl-main"><ol class="hl-main"><li>&nbsp;<span class="hl-identifier">AuthType</span><span class="hl-code"> </span><span class="hl-identifier">Basic</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">Require</span><span class="hl-code"> </span><span class="hl-identifier">valid</span><span class="hl-code">-</span><span class="hl-reserved">user</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">AuthName</span><span class="hl-code"> </span><span class="hl-quotes">&quot;</span><span class="hl-string">Halt! Who goes there?</span><span class="hl-quotes">&quot;</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">AuthUserFile</span><span class="hl-code"> /</span><span class="hl-identifier">www</span><span class="hl-code">/</span><span class="hl-identifier">passwords</span><span class="hl-code">/.</span><span class="hl-identifier">passwd</span></li></ol></div></div></p>
<p>Now with just a few tweaks we can make less of a simple all or nothing wall between your users and the content and set some of it free.</p>
<h2>Allowing Access via IP Address</h2>
<p>So, you want to require a password to outsiders but you and your co-workers are getting tired of entering the username and password for every small visit needed to the site? If your office has a static IP address, allow it.</p>
<p><div class="hl-wrapper"><div class="hl-main"><ol class="hl-main"><li>&nbsp;<span class="hl-identifier">AuthType</span><span class="hl-code"> </span><span class="hl-identifier">Basic</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">Require</span><span class="hl-code"> </span><span class="hl-identifier">valid</span><span class="hl-code">-</span><span class="hl-reserved">user</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">AuthName</span><span class="hl-code"> </span><span class="hl-quotes">&quot;</span><span class="hl-string">Halt! Who goes there?</span><span class="hl-quotes">&quot;</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">AuthUserFile</span><span class="hl-code"> /</span><span class="hl-identifier">www</span><span class="hl-code">/</span><span class="hl-identifier">passwords</span><span class="hl-code">/.</span><span class="hl-identifier">passwd</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">Allow</span><span class="hl-code"> </span><span class="hl-reserved">from</span><span class="hl-code"> </span><span class="hl-identifier">xxx</span><span class="hl-code">.</span><span class="hl-identifier">xxx</span><span class="hl-code">.</span><span class="hl-identifier">xxx</span><span class="hl-code">.</span><span class="hl-identifier">xxx</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">Satisfy</span><span class="hl-code"> </span><span class="hl-reserved">Any</span></li></ol></div></div></p>
<p>What we&#8217;re telling Apache is to allow access from the IP address and to Satisfy any of the access requirements. If Satisfy were set to all, access would require username, password <i>and</i> IP address matches to grant access.</p>
<h2>Unprotecting Content</h2>
<p>Sometimes we need to poke holes in the wall to allow unfettered access to one resource or another. This is pretty straight forward.  </p>
<p>First off, lets allow access to an entire directory. In the directory you want to open up, make a .htaccess file and add just this code:</p>
<p><div class="hl-wrapper"><div class="hl-main"><ol class="hl-main"><li>&nbsp;<span class="hl-identifier">Satisfy</span><span class="hl-code"> </span><span class="hl-reserved">Any</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;</span><span class="hl-identifier">Allow</span><span class="hl-code"> </span><span class="hl-reserved">from</span><span class="hl-code"> </span><span class="hl-reserved">all</span></li></ol></div></div></p>
<p>We pretty much just tell Apache that anyone should be let in and all auth directives should be considered satisfied.</p>
<p>But maybe we don&#8217;t want to give full access to everything in that folder. Maybe its just one file. That can be done too. All we need to do is use the Apache <code>Files</code> directive to provide a filename to allow access to.</p>
<p><div class="hl-wrapper"><div class="hl-main"><ol class="hl-main"><li>&nbsp;<span class="hl-code">&lt;</span><span class="hl-identifier">Files</span><span class="hl-code"> </span><span class="hl-identifier">file</span><span class="hl-code">.</span><span class="hl-identifier">html</span><span class="hl-code">&gt;</span></li>
<li><span class="hl-code">&nbsp;    </span><span class="hl-identifier">Satisfy</span><span class="hl-code"> </span><span class="hl-reserved">Any</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;    </span><span class="hl-identifier">Allow</span><span class="hl-code"> </span><span class="hl-reserved">from</span><span class="hl-code"> </span><span class="hl-reserved">all</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;&lt;/</span><span class="hl-identifier">Files</span><span class="hl-code">&gt;</span></li></ol></div></div></p>
<p>Lastly, this can also be done for a series of files based on regex filename matching. This code allows access to images without requiring auth:</p>
<p><div class="hl-wrapper"><div class="hl-main"><ol class="hl-main"><li>&nbsp;<span class="hl-code">&lt;</span><span class="hl-identifier">FilesMatch</span><span class="hl-code"> </span><span class="hl-quotes">&quot;</span><span class="hl-special">\.</span><span class="hl-string">(gif|jpe?g|png)$</span><span class="hl-quotes">&quot;</span><span class="hl-code">&gt;</span></li>
<li><span class="hl-code">&nbsp;    </span><span class="hl-identifier">Satisfy</span><span class="hl-code"> </span><span class="hl-reserved">Any</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;    </span><span class="hl-identifier">Allow</span><span class="hl-code"> </span><span class="hl-reserved">from</span><span class="hl-code"> </span><span class="hl-reserved">all</span><span class="hl-code"></span></li>
<li><span class="hl-code">&nbsp;&lt;</span><span class="hl-identifier">FilesMatch</span><span class="hl-code">&gt;</span></li></ol></div></div></p>
<h2>And that&#8217;s not all</h2>
<p>This is really just scratching the surface, but for a lot of day to day needs of projects in development that shouldn&#8217;t be opened up to the whole world these guys can go a long way to helping make life just a little bit easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2009/07/10/simple-but-handy-htaccess-tricks/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Announcing the SP Source Code Highlighter plugin for WordPress</title>
		<link>http://top-frog.com/2009/07/07/announcing-the-sp-source-code-highlighter-plugin-for-wordpress/</link>
		<comments>http://top-frog.com/2009/07/07/announcing-the-sp-source-code-highlighter-plugin-for-wordpress/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 06:55:04 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[PHP Scripting]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[highlight]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://top-frog.com/?p=779</guid>
		<description><![CDATA[Maybe you noticed already, maybe you didn&#8217;t (I&#8217;ll wager on the latter ) that recently this site got new source code highlighting in posts. Or, should I say, that it GOT source code highlighting in posts. I had made a simple Script Source viewer a while back. Something simple and straight forward that I could [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe you noticed already, maybe you didn&#8217;t (I&#8217;ll wager on the latter <img src='http://top-frog.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) that recently this site got new source code highlighting in posts. Or, should I say, that it GOT source code highlighting in posts.</p>
<p>I had made a simple <a href="http://top-frog.com/script_src/source.phps">Script Source</a> viewer a while back. Something simple and straight forward that I could use to display full source code files in an easy to read and copy format (since the source is an ordered list the line numbers don&#8217;t copy). I was so happy with the way the source highlighting along with the line numbers turned out that I really wanted to put that in my posts. But I guess not wanted bad enough to do right away.</p>
<p>So, now I finally got around to putting this together for use inline in my posts and decided to package it together for public consumption. The highlighting is pretty durned nice and fully CSS configurable. It supports a decent number of languages and if it doesn&#8217;t support your language of choice, chances are there&#8217;s something in there that&#8217;s close enough.</p>
<p>The only drawback, and this may be a show stopper for some folks on shared hosting, is that it has a dependency on the Pear Text_Highlighter package. Since this plugin was primarily for me and I have control over my servers this isn&#8217;t a big deal here, but may keep some from being able to use it at all. If you like it enough then contact your host. You never know, they might be accommodating. There&#8217;s more about this on the project page. It basically boils down to: if you don&#8217;t know, it doesn&#8217;t hurt to ask.</p>
<p>So, enough already, head on over to the <a href="http://top-frog.com/projects/sp-highlight-source/">SP Source Code Highlighter Plugin&#8217;s Project page</a> and see how it looks and works. </p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2009/07/07/announcing-the-sp-source-code-highlighter-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress TextMate bundle updated for WordPress 2.8</title>
		<link>http://top-frog.com/2009/06/19/wordpress-textmate-bundle-updated-for-wordpress-28/</link>
		<comments>http://top-frog.com/2009/06/19/wordpress-textmate-bundle-updated-for-wordpress-28/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 00:33:03 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[2.8]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[getbundles]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp2.8]]></category>

		<guid isPermaLink="false">http://top-frog.com/?p=674</guid>
		<description><![CDATA[The WordPress TextMate bundle has been updated for WordPress 2.8. New items include: quick access to esc_ functions. Mark Jaquith great writeup of the new escaping functions as well as the reasoning behind them new WordPress 2.8 widget templates. Head over to WP Engineer for a tutorial on the new widgets. The new OO structure [...]]]></description>
			<content:encoded><![CDATA[<p>The WordPress TextMate bundle has been updated for WordPress 2.8. New items include:</p>
<ul>
<li>quick access to esc_ functions. Mark Jaquith <a href="http://markjaquith.wordpress.com/2009/06/12/escaping-api-updates-for-wordpress-2-8/">great writeup of the new escaping functions as well as the reasoning behind them</a></li>
<li>new WordPress 2.8 widget templates. Head over to WP Engineer for a <a href="http://wpengineer.com/wordpress-built-a-widget/">tutorial on the new widgets</a>. The new OO structure is a welcome change. Very, very welcome.</li>
</ul>
<p>Get more information on <a href="/projects/wordpress-textmate-bundle/">the WordPress TextMate Bundle project page</a>, download it from the <a href="http://github.com/Gipetto/wordpress.tmbundle/tree/master">Github project page</a>, or, if you installed it via <a href="http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/">GetBundles</a>  (which is really the best way to keep up with it) you can simply upgrade it from TextMate. If you don&#8217;t already use GetBundles, you really should. Use Subversion to install it from that url.</p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2009/06/19/wordpress-textmate-bundle-updated-for-wordpress-28/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Announcing the WordPress TextMate Bundle</title>
		<link>http://top-frog.com/2009/04/29/announcing-the-wordpress-textmate-bundle/</link>
		<comments>http://top-frog.com/2009/04/29/announcing-the-wordpress-textmate-bundle/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 15:11:41 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[autocomplete]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://top-frog.com/?p=583</guid>
		<description><![CDATA[As the name implies this is a TextMate bundle to assist with WordPress development. Where I work we&#8217;re on WordPress almost every day doing this or that and it gets pretty tedious to not only remember the schizophrenia that is PHP syntax, but the schizophrenia that is my own code as well as the schizophrenia [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/projects/wordpress-textmate-bundle/"><img src="http://top-frog.com/wp/wp-content/uploads/2009/04/bundle-announce-header.png" alt="bundle-announce-header" title="bundle-announce-header" width="450" height="152" class="alignnone size-full wp-image-587" /></a></p>
<p>As the name implies this is a <a href="http://macromates.com">TextMate</a> bundle to assist with <a href="http://wordpress.org">WordPress</a> development. Where I work we&#8217;re on WordPress almost every day doing this or that and it gets pretty tedious to not only remember the schizophrenia that is PHP syntax, but the schizophrenia that is my own code as well as the schizophrenia that is the WordPress code base (don&#8217;t take that the wrong way, pretty much every code base out there is a little bit schizo). </p>
<p>To that end I got together with my co-worker <a href="http://gordonbrander">Gordon</a> and started hacking together this bundle. Gordon&#8217;s a detailed oriented guy, and I like to pretend to be, so together we were able to sufficiently over-analyze the situation and put together what we feel is a heck of a good resource for developing under WordPress with TextMate (<a href="http://gregorygrubbs.com/">someone I know</a> has already taken part of it and converted it to emacs! Heathen <img src='http://top-frog.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
<p>So if you&#8217;re a TextMate user you should check out the <a href="/projects/wordpress-textmate-bundle/" title="WordPress TextMate Development Bundle">WordPress TextMate Bundle</a> and let us know what you think! This is the first official release announcement and it is bound to have a bug or two, so if you find anything be sure to let us know at the GitHub project page.</p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2009/04/29/announcing-the-wordpress-textmate-bundle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Client side pre- and post-svn hooks with Unix Aliases</title>
		<link>http://top-frog.com/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix-aliases/</link>
		<comments>http://top-frog.com/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix-aliases/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 14:31:10 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://top-frog.com/?p=574</guid>
		<description><![CDATA[Its probably nothing new but I came up with a way to do client side post- or pre-svn actions. Its nothing revolutionary but has already come in handy. The script is *nix only (though I don&#8217;t see why the same process wouldn&#8217;t work on Windows if it supports command line aliases like *nix does). I [...]]]></description>
			<content:encoded><![CDATA[<p>Its probably nothing new but I came up with a way to do client side post- or pre-svn actions. Its nothing revolutionary but has already come in handy. The script is *nix only (though I don&#8217;t see why the same process wouldn&#8217;t work on Windows if it supports command line aliases like *nix does).</p>
<p>I had to write <a href="/script_src/ssh-action.sh">this bash script</a> because we had files at work that needed to be version controlled but still writable by the server process. The need arose because when Subversion updates a file it updates the files permissions with that of the user that did the SVN action. I&#8217;m not entirely sure but I think this is because the file isn&#8217;t actually updated, but replaced by Subversion (if anyone can confirm that, I&#8217;d appreciate it).</p>
<p><span id="more-574"></span></p>
<p>So, this script is pretty simple. It sits in between you and Subversion via an alias and passes everything it gets through to Subversion and then operates based on the action that was taken in Subversion. </p>
<p>In the case of the sample file, we look to see if an update has been performed. If so, we update any files we find in the base path that have a file name that indicates that it needs to be an editable file. I use chmod, but assigning to a group, depending upon the security level needs of the server, would probably be a better idea. In my case simple 0777 assignment as fine.</p>
<p>The key parts of the script are two fold:</p>
<ul>
<li>Use of an alias in the <code>~/.bashrc</code> file to override the default SVN command with this script. Unix will look in a user&#8217;s local scope for command aliases before it searches the path, so we can capture svn command so that we don&#8217;t have to a) remember that this special script is there, b) remember to tell others that this special script is there. Its automatic just by calling svn as normal.</li>
<li>Use of the <code>$@</code> bash operator to pass every parameter this script received, just as it received it, down to the proper svn command for execution</li>
</ul>
<p>All in all not terribly complicated and the instructions and example are so straight forward it doesn&#8217;t warrant duplicating the instructions <a href="/script_src/ssh-action.sh">that are in the script</a>. Now that I think of it this might be a good candidate for being a Ruby script instead of a Bash script, but the proof of concept is there and I know Bash much better than I do Ruby at this point (though, I do have a decent Ruby based project that&#8217;ll be announced soon for you WordPress &#038; TextMate users. That also assumes anyone is actually reading this <img src='http://top-frog.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2009/04/23/client-side-pre-and-post-svn-hooks-with-unix-aliases/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XHTMLr (beta)</title>
		<link>http://top-frog.com/2007/07/05/xhtmlr-beta/</link>
		<comments>http://top-frog.com/2007/07/05/xhtmlr-beta/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 05:08:03 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[coconut]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[fuzzy]]></category>
		<category><![CDATA[lookup]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[xhtmlr]]></category>

		<guid isPermaLink="false">http://top-frog.local/?p=470</guid>
		<description><![CDATA[The name plays off the older Web 2.0 trends of funky names being copied from Flickr and constant beta status of a lot of emerging projects. The XHTMLr is the beginnings of an online companion to the Fuzzy Coconut XHTML Reference Widget. Designed to be clean and straight forward it still needs a database expansion to have [...]]]></description>
			<content:encoded><![CDATA[<p><span class="thumb_box"><a href="http://www.fuzzycoconut.com/xhtmlr"><img src="/images/works/xhtmlr_thumb.png" alt="XHTMLr (beta) HTML Syntax Search" /></a></span>The name plays off the older Web 2.0 trends of funky names being copied from Flickr and constant beta status of a lot of emerging projects. The <a href="http://www.fuzzycoconut.com/xhtmlr">XHTMLr</a> is the beginnings of an online companion to the <a href="http://www.fuzzycoconut.com/widget/">Fuzzy Coconut XHTML Reference Widget</a>. Designed to be clean and straight forward it still needs a database expansion to have more detailed sample information since we have much more room to work than we did in the widget.</p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2007/07/05/xhtmlr-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Long Live the Image Map!</title>
		<link>http://top-frog.com/2007/03/16/long-live-the-image-map/</link>
		<comments>http://top-frog.com/2007/03/16/long-live-the-image-map/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 03:14:13 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Web Design & Development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[map]]></category>

		<guid isPermaLink="false">http://top-frog.local/?p=325</guid>
		<description><![CDATA[Oldie but Goodie Why should the image map be ignored? Its understood by every major browser around and is perfectly suited to do what some people insist on doing in flash. This sample shows a simple North American map divided up into regions and the rollovers controlled by some very simple JavaScript code. JavaScript was [...]]]></description>
			<content:encoded><![CDATA[<h4>Oldie but Goodie</h4>
<p><span class="thumb_box"><a class="thickbox" href="/stuff/map?KeepThis=true&#038;TB_iframe=true&#038;height=300&#038;width=300"><img src="http://top-frog.local/wp/wp-content/uploads/2009/03/image_map_thumb.png" alt="Image Map Thumbnail Image" title="Image Map Thumbnail Image" width="95" height="79" class="alignnone size-full wp-image-425" /></a></span>Why should the image map be ignored? Its understood by every major browser around and is perfectly suited to do what some people insist on doing in flash. <a href="/stuff/map">This sample</a> shows a simple North American map divided up into regions and the rollovers controlled by some very simple JavaScript code. JavaScript was lifted from some Macromedia code I found, nothing special, and could be rewritten using newer JS and CSS and take significantly less lines.</p>
]]></content:encoded>
			<wfw:commentRss>http://top-frog.com/2007/03/16/long-live-the-image-map/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>