<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>devhands</title>
	
	<link>http://www.devhands.com</link>
	<description>Inspired by consistent circumstances</description>
	<lastBuildDate>Mon, 15 Feb 2010 12:44:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="devhands" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://www.devhands.com/feed/" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Fwww.devhands.com%2Ffeed%2F" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Fwww.devhands.com%2Ffeed%2F" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Fwww.devhands.com%2Ffeed%2F" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://www.devhands.com/feed/" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Fwww.devhands.com%2Ffeed%2F" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Fwww.devhands.com%2Ffeed%2F" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Fwww.devhands.com%2Ffeed%2F" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><item>
		<title>Migrating and syncing samba users</title>
		<link>http://www.devhands.com/2010/02/migrating-and-syncing-samba-users/</link>
		<comments>http://www.devhands.com/2010/02/migrating-and-syncing-samba-users/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 12:44:35 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[linux/unix]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=492</guid>
		<description><![CDATA[Samba maintains it&#8217;s own user and password database. If you want to synchronize samba users with system users pam_smbpass will to the trick.
Debian/Ubuntu:

sudo apt-get install libpam-smbpass

This package installs pam_smbpass.so and modifies pam.d common-auth and common-password scripts to keep system and samba users in sync.
]]></description>
			<content:encoded><![CDATA[<p>Samba maintains it&#8217;s own user and password database. If you want to synchronize samba users with system users pam_smbpass will to the trick.</p>
<p>Debian/Ubuntu:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libpam-smbpass</pre></div></div>

<p>This package installs pam_smbpass.so and modifies pam.d common-auth and common-password scripts to keep system and samba users in sync.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=rfhGme08c_g:D4J9otv_lbE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=rfhGme08c_g:D4J9otv_lbE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=rfhGme08c_g:D4J9otv_lbE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=rfhGme08c_g:D4J9otv_lbE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=rfhGme08c_g:D4J9otv_lbE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=rfhGme08c_g:D4J9otv_lbE:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/02/migrating-and-syncing-samba-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript is the language of our future… on the backend!</title>
		<link>http://www.devhands.com/2010/02/javascript-is-the-language-of-our-future-on-the-backend/</link>
		<comments>http://www.devhands.com/2010/02/javascript-is-the-language-of-our-future-on-the-backend/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:02:50 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=488</guid>
		<description><![CDATA[Check out this presentation about successful use of comet server based on node.js in highly scalable realtime web application.

]]></description>
			<content:encoded><![CDATA[<p>Check out this presentation about successful use of comet server based on node.js in highly scalable realtime web application.</p>
<p><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cometwithnodejsv8-091229102648-phpapp02&#038;rel=0&#038;stripped_title=comet-with-nodejs-and-v8" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cometwithnodejsv8-091229102648-phpapp02&#038;rel=0&#038;stripped_title=comet-with-nodejs-and-v8" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=A_4BylN9uiQ:BMLoC_jhpUQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=A_4BylN9uiQ:BMLoC_jhpUQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=A_4BylN9uiQ:BMLoC_jhpUQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=A_4BylN9uiQ:BMLoC_jhpUQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=A_4BylN9uiQ:BMLoC_jhpUQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=A_4BylN9uiQ:BMLoC_jhpUQ:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/02/javascript-is-the-language-of-our-future-on-the-backend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Audio Podcast: Unlearn Your MBA</title>
		<link>http://www.devhands.com/2010/02/audio-podcast-unlearn-your-mba/</link>
		<comments>http://www.devhands.com/2010/02/audio-podcast-unlearn-your-mba/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 09:56:22 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[other]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=481</guid>
		<description><![CDATA[A very very interesting audio podcast from David Heineimeier Hansson, the creator of Ruby on Rails about his IT business approach and why you should unlearn what you have study in universities.

]]></description>
			<content:encoded><![CDATA[<p>A very very interesting audio podcast from David Heineimeier Hansson, the creator of Ruby on Rails about his IT business approach and why you should unlearn what you have study in universities.</p>
<p><embed id='single' width='500' height='303' flashvars='config=http://ecorner.stanford.edu/embeded_config.xml%3Fmid%3D2334' src='http://ecorner.stanford.edu/swf/player-ec.swf' type='application/x-shockwave-flash'></embed></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=3ZrIHjOIPN4:QeCpEudgWhw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=3ZrIHjOIPN4:QeCpEudgWhw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=3ZrIHjOIPN4:QeCpEudgWhw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=3ZrIHjOIPN4:QeCpEudgWhw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=3ZrIHjOIPN4:QeCpEudgWhw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=3ZrIHjOIPN4:QeCpEudgWhw:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/02/audio-podcast-unlearn-your-mba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP preg_replace URL</title>
		<link>http://www.devhands.com/2010/02/php-preg_replace-url/</link>
		<comments>http://www.devhands.com/2010/02/php-preg_replace-url/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 08:59:33 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=469</guid>
		<description><![CDATA[To search for urls and convert them into html links you may use preg_replace() in PHP. Though writing regular expression might be not very easy. Here is an example of regular expression which will catch and replace urls which may be:

in the beginning of string,
in the end of string,
configurable prefix/suffix delimiter,
with configurable scheme.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
&#60;?php
&#160;
// configurable delimiters [...]]]></description>
			<content:encoded><![CDATA[<p>To search for urls and convert them into html links you may use <a href="http://www.php.net/preg_replace">preg_replace()</a> in PHP. Though writing regular expression might be not very easy. Here is an example of regular expression which will catch and replace urls which may be:</p>
<ul>
<li>in the beginning of string,</li>
<li>in the end of string,</li>
<li>configurable prefix/suffix delimiter,</li>
<li>with configurable scheme.</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// configurable delimiters and schemes</span>
<span style="color: #000088;">$delimiters</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'\\s&quot;\\.\','</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$schemes</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'https?|ftps?'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#(^|[%s])((?:%s)://\\S+[^%1$s])([%1$s]?)#i'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$delimiters</span><span style="color: #339933;">,</span> <span style="color: #000088;">$schemes</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$replacement</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'$1&lt;a href=&quot;$2&quot;&gt;$2&lt;/a&gt;$3'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$subjects</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'http://localhost'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'https://example.com'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">' ftp://example.com'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'ftps://example.com '</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix http://example.com'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'http://example.com suffix'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix http://example.com/path suffix'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix http://example.com/path&amp;var=val suffix'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix http://example.com/path&amp;var=val, suffix'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix http://example.com/path&amp;var=val. suffix'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix &quot;http://example.com/path&amp;var=val&quot; suffix'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'prefix \'http://example.com/path&amp;var=val\' suffix'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$subjects</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span> <span style="color: #000088;">$replacement</span><span style="color: #339933;">,</span> <span style="color: #000088;">$subject</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=3kYUioqjSF0:OgegCMMw4HU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=3kYUioqjSF0:OgegCMMw4HU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=3kYUioqjSF0:OgegCMMw4HU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=3kYUioqjSF0:OgegCMMw4HU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=3kYUioqjSF0:OgegCMMw4HU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=3kYUioqjSF0:OgegCMMw4HU:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/02/php-preg_replace-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuous Integration and development environment approach</title>
		<link>http://www.devhands.com/2010/01/continuous-integration-and-development-environment-approach/</link>
		<comments>http://www.devhands.com/2010/01/continuous-integration-and-development-environment-approach/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 18:01:15 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=463</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cidev-env-approach-100125073023-phpapp01&#038;stripped_title=continuous-integration-and-development-environment-approach" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=cidev-env-approach-100125073023-phpapp01&#038;stripped_title=continuous-integration-and-development-environment-approach" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=bT9shT8ANwQ:nc3qN-OELbs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=bT9shT8ANwQ:nc3qN-OELbs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=bT9shT8ANwQ:nc3qN-OELbs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=bT9shT8ANwQ:nc3qN-OELbs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=bT9shT8ANwQ:nc3qN-OELbs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=bT9shT8ANwQ:nc3qN-OELbs:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/01/continuous-integration-and-development-environment-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPDocTester – console script for evaluating your PHPDoc comments</title>
		<link>http://www.devhands.com/2010/01/phpdoctester-console-script-for-evaluating-your-phpdoc-comments/</link>
		<comments>http://www.devhands.com/2010/01/phpdoctester-console-script-for-evaluating-your-phpdoc-comments/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 22:10:36 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[linux/unix]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[phpdoc]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=456</guid>
		<description><![CDATA[If you are fan of command line like me and do some PHP coding in console or simply keep console constantly opened than this script could be useful for you for quick evaluation of PHPDoc documentation generated for your PHP.
This script will generate PHPDoc documentation saving all files into temporary folder, display them in elinks [...]]]></description>
			<content:encoded><![CDATA[<p>If you are fan of command line like me and do some PHP coding in console or simply keep console constantly opened than this script could be useful for you for quick evaluation of PHPDoc documentation generated for your PHP.</p>
<p>This script will generate PHPDoc documentation saving all files into temporary folder, display them in elinks console web browser and clear temporary folder after leaving browser. Script expects &#8220;elinks&#8221; and &#8220;phpdoc&#8221; to be installed on your system.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:
&nbsp;
<span style="color: #666666; font-style: italic;"># check input parameters</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$#&quot;</span> <span style="color: #660033;">-lt</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage:&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`basename $0`</span> filename/dirname [options]&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># create temporary directory</span>
<span style="color: #007800;">TARGET</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mktemp</span> <span style="color: #660033;">-dt</span> phpdoctester.XXXXXX<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #007800;">FILE</span>=$<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># check if input is directory, otherwise assume it's file or filemask</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$FILE</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">FCONFDIR</span>=<span style="color: #ff0000;">&quot;--directory&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #007800;">FCONFDIR</span>=<span style="color: #ff0000;">&quot;--filename&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># create phpdoc documentation in temporary directory</span>
phpdoc \
	<span style="color: #007800;">$FCONFDIR</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$FILE</span>&quot;</span> \
	<span style="color: #660033;">--target</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TARGET</span>&quot;</span> \
	<span style="color: #660033;">--parseprivate</span> on \
	<span style="color: #660033;">--undocumentedelements</span> on \
	<span style="color: #660033;">--output</span> HTML:frames:default \
	<span style="color: #000000; font-weight: bold;">|</span>
	<span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-P</span> <span style="color: #ff0000;">'ERROR in |WARNING in '</span> \
	<span style="color: #000000; font-weight: bold;">|</span>
	<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/^\s*\(.*\)/\1/'</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Press any key to open phpdoc in console web browser...&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">read</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># show documentation in console browser</span>
<span style="color: #007800;">DOCFILE</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${TARGET}</span>/index.html&quot;</span>
elinks <span style="color: #007800;">$DOCFILE</span> 
&nbsp;
<span style="color: #666666; font-style: italic;"># remove temporary directory</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-r</span> <span style="color: #007800;">$TARGET</span></pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=X2sa9u4o-Lc:IosFRe97-DU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=X2sa9u4o-Lc:IosFRe97-DU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=X2sa9u4o-Lc:IosFRe97-DU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=X2sa9u4o-Lc:IosFRe97-DU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=X2sa9u4o-Lc:IosFRe97-DU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=X2sa9u4o-Lc:IosFRe97-DU:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/01/phpdoctester-console-script-for-evaluating-your-phpdoc-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX-based page update with graceful degradation</title>
		<link>http://www.devhands.com/2010/01/ajax-based-page-update-with-graceful-degradation/</link>
		<comments>http://www.devhands.com/2010/01/ajax-based-page-update-with-graceful-degradation/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 22:00:46 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=446</guid>
		<description><![CDATA[This is a simplified POC showing how to use partial page update with AJAX when JavaScript is enabled but still have working website links in case of disabled JavaScript in client browser. It uses a bit of jQuery and PHP scripting.
Go directly to the demonstration. You can safely disable JavaScript in your browser (don&#8217;t forget [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simplified POC showing how to use partial page update with AJAX when JavaScript is enabled but still have working website links in case of disabled JavaScript in client browser. It uses a bit of jQuery and PHP scripting.</p>
<p><a href="http://www.devhands.com/wp-content/custom/smartlinks/#page3">Go directly to the demonstration.</a> You can safely disable JavaScript in your browser (don&#8217;t forget to reload page though after that) and links still will work. You may also copy hash based links (http://www.devhands.com/wp-content/custom/smartlinks/#page3) and insert them into new browser tab, they also will work with enabled JavaScript.<br />
<span id="more-446"></span><br />
<a href='http://www.devhands.com/wp-content/uploads/2010/01/smartlinks.tar.gz'>Download full package</a> or check the JavaScript logic right here:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
   &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html
    xmlns=&quot;http://www.w3.org/1999/xhtml&quot;
    xmlns:devhands=&quot;http://www.example.com/schema&quot;&gt;
&lt;head&gt;
    &lt;title&gt;Smart links POC&lt;/title&gt;&lt;a href='http://www.devhands.com/wp-content/uploads/2010/01/smartlinks.tar.gz'&gt;smartlinks.tar&lt;/a&gt;
    &lt;link type=&quot;text/css&quot; href=&quot;http://jqueryui.com/latest/themes/base/ui.all.css&quot; rel=&quot;stylesheet&quot; /&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;h1&gt;Smart links Proof-Of-Concept&lt;/h1&gt;
&nbsp;
    &lt;p&gt;
        This is a simplified example with combined direct (full page load) and ajax (partial content update) links with gracefull degradation. You can try disabling JavaScript in your browser at all.
        These links should be good to search engines as well. JavaScript history handling is not implemented here, though it's not hard to add it.
    &lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;a href=&quot;?page=page1&quot; devhands:hash=&quot;page1&quot; devhands:target=&quot;#placeholder&quot; devhands:href=&quot;?page=page1&amp;mode=partial&quot;&gt;page-1&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;?page=page2&quot; devhands:hash=&quot;page2&quot; devhands:target=&quot;#placeholder&quot; devhands:href=&quot;?page=page2&amp;mode=partial&quot;&gt;page-2 (+ css)&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;?page=page3&quot; devhands:hash=&quot;page3&quot; devhands:target=&quot;#placeholder&quot; devhands:href=&quot;?page=page3&amp;mode=partial&quot;&gt;page-3 (+ javascript)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&nbsp;
    &lt;div id=&quot;placeholder&quot;&gt;Loading data...&lt;/div&gt;
    <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #009966; font-style: italic;">/*&lt;![CDATA[*/</span>
        $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
            <span style="color: #003366; font-weight: bold;">var</span> baseUri <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>location<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> location.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> location.<span style="color: #660066;">lastIndexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'/'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">//</span>
            <span style="color: #006600; font-style: italic;">// if request was made to open concrete page or query string was not</span>
            <span style="color: #006600; font-style: italic;">// empty reloadPageUrl will be populated with url which will be used</span>
            <span style="color: #006600; font-style: italic;">// for all &quot;smart&quot; links (real page reload will happend)</span>
            <span style="color: #006600; font-style: italic;">//</span>
            <span style="color: #006600; font-style: italic;">// in our case this url will be site frontpage url</span>
            <span style="color: #006600; font-style: italic;">//</span>
&nbsp;
            <span style="color: #003366; font-weight: bold;">var</span> reloadPageUrl <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">search</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">return</span> baseUri<span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">//</span>
            <span style="color: #006600; font-style: italic;">// intial page load (load partial content immediately after page has</span>
            <span style="color: #006600; font-style: italic;">// been loaded)</span>
            <span style="color: #006600; font-style: italic;">//</span>
&nbsp;
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>reloadPageUrl<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #3366CC;">'#'</span> <span style="color: #339933;">!=</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> page <span style="color: #339933;">=</span> encodeURIComponent<span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">location</span>.<span style="color: #660066;">hash</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> page <span style="color: #339933;">=</span> <span style="color: #3366CC;">'page1'</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#placeholder'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span>baseUri <span style="color: #339933;">+</span> <span style="color: #3366CC;">'?page='</span> <span style="color: #339933;">+</span> page <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&amp;mode=partial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
&nbsp;
            <span style="color: #006600; font-style: italic;">//</span>
            <span style="color: #006600; font-style: italic;">// click handler for &quot;smart&quot; links</span>
            <span style="color: #006600; font-style: italic;">//</span>
&nbsp;
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #003366; font-weight: bold;">var</span> href <span style="color: #339933;">=</span> baseUri <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'devhands:href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> target <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'devhands:target'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #003366; font-weight: bold;">var</span> hash <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">getAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'devhands:hash'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>href <span style="color: #339933;">&amp;&amp;</span> target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>hash <span style="color: #339933;">&amp;&amp;</span> reloadPageUrl<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        document.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> reloadPageUrl <span style="color: #339933;">+</span> <span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> hash<span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
&nbsp;
                    $<span style="color: #009900;">&#40;</span>target<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span>href<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>hash<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        document.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'#'</span> <span style="color: #339933;">+</span> hash<span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
&nbsp;
                    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009966; font-style: italic;">/*]]&gt;*/</span>
    <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=vNayWTa_4WU:8aQ7nM9yUQI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=vNayWTa_4WU:8aQ7nM9yUQI:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=vNayWTa_4WU:8aQ7nM9yUQI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=vNayWTa_4WU:8aQ7nM9yUQI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=vNayWTa_4WU:8aQ7nM9yUQI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=vNayWTa_4WU:8aQ7nM9yUQI:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/01/ajax-based-page-update-with-graceful-degradation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scalable web architecture</title>
		<link>http://www.devhands.com/2010/01/scalable-web-architecture/</link>
		<comments>http://www.devhands.com/2010/01/scalable-web-architecture/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:40:27 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[linux/unix]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=440</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scalablewebarchitecture-100119132629-phpapp01&#038;stripped_title=scalable-web-architecture-2950852" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=scalablewebarchitecture-100119132629-phpapp01&#038;stripped_title=scalable-web-architecture-2950852" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=vbcLyxyBVvI:GIXT6HaIxxs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=vbcLyxyBVvI:GIXT6HaIxxs:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=vbcLyxyBVvI:GIXT6HaIxxs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=vbcLyxyBVvI:GIXT6HaIxxs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=vbcLyxyBVvI:GIXT6HaIxxs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=vbcLyxyBVvI:GIXT6HaIxxs:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/01/scalable-web-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domains whitelist for Exim smarthost</title>
		<link>http://www.devhands.com/2010/01/domains-whitelist-for-exim-smarthost/</link>
		<comments>http://www.devhands.com/2010/01/domains-whitelist-for-exim-smarthost/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 22:40:05 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[linux/unix]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=437</guid>
		<description><![CDATA[Here is a quick hack for making a whitelist of destination domains for your exim smarthost configuration. It means that emails will be sent only to domains which you explicitly specify.
You may ask why &#8220;hack&#8221;? Because Exim will send bounce emails which most probably is not what you want, reject could be a better behavior.
Find [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick hack for making a whitelist of destination domains for your exim smarthost configuration. It means that emails will be sent only to domains which you explicitly specify.</p>
<p>You may ask why &#8220;hack&#8221;? Because Exim will send bounce emails which most probably is not what you want, reject could be a better behavior.</p>
<p>Find your Exim configuration file for smarthost, /etc/exim4/exim4.conf.template under Ubuntu. And edit domains configuration parameter specifying colon separated list of allowed destination domains as a value.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">domains = domain1.com:domain2.com</pre></div></div>

<p>If your use Ubuntu update main configuration file by executing <strong>update-exim4.conf</strong> from command line as root user.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=CjoIsMz5yWQ:bdDnyrP87qM:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=CjoIsMz5yWQ:bdDnyrP87qM:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=CjoIsMz5yWQ:bdDnyrP87qM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=CjoIsMz5yWQ:bdDnyrP87qM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=CjoIsMz5yWQ:bdDnyrP87qM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=CjoIsMz5yWQ:bdDnyrP87qM:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/01/domains-whitelist-for-exim-smarthost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion hook php framework</title>
		<link>http://www.devhands.com/2010/01/subversion-hook-php-framework-in/</link>
		<comments>http://www.devhands.com/2010/01/subversion-hook-php-framework-in/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:49:41 +0000</pubDate>
		<dc:creator>Aleksandr Tsertkov</dc:creator>
				<category><![CDATA[linux/unix]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.devhands.com/?p=422</guid>
		<description><![CDATA[Subversion provides very powerful hook system which allows extending it with custom logic. Hook is a command line script which is executed on selected repository event receiving metadata as command line arguments and providing results within output and exit code.
With a help of hook script you can validate commit log message or even submitted changes [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion provides very powerful hook system which allows extending it with custom logic. Hook is a command line script which is executed on selected repository event receiving metadata as command line arguments and providing results within output and exit code.</p>
<p>With a help of hook script you can validate commit log message or even submitted changes before saving them into repository and notify user if there are any errors.</p>
<p>If you have php on your server with a help of special PHP class your very powerful subversion hook might look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">#!/usr/bin/php
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require</span> <span style="color: #0000ff;">'/var/svn/common-hooks/CommitTests.php'</span><span style="color: #339933;">;</span>
<span style="color: #990000;">putenv</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'PATH=/usr/bin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">new</span> CommitTests<span style="color: #009900;">&#40;</span><span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$argv</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'LogMessageLength'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'TabIndents'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'php'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'phtml'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'TrailingSpaces'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'php'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'phtml'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'ini'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'SvnProperties'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'php'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'svn:keywords=Revision'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'svn:eol-style=LF'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'phtml'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'svn:keywords=Revision'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'svn:eol-style=LF'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'html'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'svn:eol-style=LF'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This script have following pre-commit validation rules:</p>
<ul>
<li>Minimum log message length is 3 characters</li>
<li>Tab indents are not allowed in *.php and *.phtml files</li>
<li>Trailing spaces are not allowed in *.php, *.phtml and *.ini files</li>
<li>*.php and *.phtml files should have following svn tags set: svn:keywords=Revision, svn:eol-style=LF</li>
<li>*.html files should have svn tag svn:eol-style=LF</li>
</ul>
<p>Download <a href='http://www.devhands.com/wp-content/uploads/2010/01/CommitTests.php_.txt'>CommitTests.php</a> file.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/devhands?a=HgSTMacHCug:IFqkWmINZlQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/devhands?i=HgSTMacHCug:IFqkWmINZlQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=HgSTMacHCug:IFqkWmINZlQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/devhands?i=HgSTMacHCug:IFqkWmINZlQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/devhands?a=HgSTMacHCug:IFqkWmINZlQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/devhands?i=HgSTMacHCug:IFqkWmINZlQ:gIN9vFwOqvQ" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devhands.com/2010/01/subversion-hook-php-framework-in/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
