<?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>ronny.haryan.to &#187; Tips</title>
	<atom:link href="http://ronny.haryan.to/archives/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://ronny.haryan.to</link>
	<description>Print: $9.50 -- Online: free</description>
	<lastBuildDate>Thu, 04 Feb 2010 13:05:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>psycopg2 and 64-bit Apache on Leopard</title>
		<link>http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/</link>
		<comments>http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 11:27:07 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/</guid>
		<description><![CDATA[The Apache httpd that comes with Mac OS X Leopard runs in 64-bit mode, so everything else that&#8217;s loaded, including mod_wsgi and psycopg2 must be able to run in 64-bit mode as well. Graham Dumpleton explained this behaviour in a post to the django-users mailing list. Compiling psycopg2 using MacPorts as well as from the [...]]]></description>
			<content:encoded><![CDATA[<p>The Apache httpd that comes with Mac OS X Leopard runs in 64-bit mode, so everything else that&#8217;s loaded, including <a href="http://code.google.com/p/modwsgi/">mod_wsgi</a> and <a href="http://initd.org/pub/software/psycopg/">psycopg2</a> must be able to run in 64-bit mode as well. Graham Dumpleton explained this behaviour in <a href="http://groups.google.com/group/django-users/msg/1c2537650eb3c79b">a post to the django-users mailing list</a>.</p>

<p>Compiling psycopg2 using MacPorts as well as from the tarball would result in something like this when loaded from a web application that runs on Apache:</p>

<pre><code>ImproperlyConfigured: Error loading psycopg2 module: dlopen(/Library/Python/2.5/site-packages/psycopg2/_psycopg.so, 2): no suitable image found.  Did find: /Library/Python/2.5/site-packages/psycopg2/_psycopg.so: no matching architecture in universal wrapper
</code></pre>

<p>So all I needed to do was force psycopg2 extension to be built for 64-bit as well as 32-bit. After extracting the latest psycopg2 source, do this instead:</p>

<pre><code>LDFLAGS="-arch ppc -arch i386 -arch x86_64" CFLAGS="-arch ppc -arch i386 -arch x86_64" python setup.py build
</code></pre>

<p>Then <code>sudo python setup.py install</code>. After that, check the .so file, it should look something like this:</p>

<pre><code>$ file /Library/Python/2.5/site-packages/psycopg2/_psycopg.so 
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so: Mach-O universal binary with 3 architectures
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture i386): Mach-O bundle i386
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture ppc7400):      Mach-O bundle ppc
/Library/Python/2.5/site-packages/psycopg2/_psycopg.so (for architecture x86_64):       Mach-O 64-bit bundle x86_64
</code></pre>

<p>Don&#8217;t forget to restart Apache, and that should be it.</p>

<p>Update: It happened to <a href="http://www.pythonware.com/products/pil/">PIL</a> too, it was giving this error: <code>The _imaging C module is not installed</code>, so I had to do the same thing as above: <code>LDFLAGS=... CFLAGS=... python setup.py build</code> followed by <code>sudo python setup.py install</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2008/09/12/psycopg2-and-64-bit-apache-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mambo mod_rewrite Security Hack</title>
		<link>http://ronny.haryan.to/archives/2007/07/09/mambo-mod_rewrite-security-hack/</link>
		<comments>http://ronny.haryan.to/archives/2007/07/09/mambo-mod_rewrite-security-hack/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 05:47:01 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2007/07/09/mambo-mod_rewrite-security-hack/</guid>
		<description><![CDATA[At work I manage several servers that are mainly used to serve websites built using the Mambo content management system. Personally I don&#8217;t follow the development of Mambo, but I know that it had/has several security vulnerabilities. One of them was pretty easy to exploit. To make matter worse, Mambo has a distinct URL structure [...]]]></description>
			<content:encoded><![CDATA[<p>At work I manage several servers that are mainly used to serve websites built using the <a href="http://www.mambo-foundation.org/">Mambo</a> content management system. Personally I don&#8217;t follow the development of Mambo, but I know that it had/has several <a href="http://www.google.com/search?q=mambo+security+vulnerabilities">security vulnerabilities</a>. One of them was pretty <a href="http://www.google.com/search?q=mambo+mosConfig_absolute_path">easy to exploit</a>. To make matter worse, Mambo has a distinct URL structure that makes it really easy to <a href="http://www.google.com/search?q=inurl%3Aindex.php%3Foption%3D">find Mambo sites using search engines</a>. This combination attracts a lot of script kiddies from all over the world. I&#8217;ve seen several successful attempts of these idiots putting IRC DCC bots and spamming activities coming from Nigeria, Brazil, Indonesia (Jogja), Russia, Italy, etc.</p>

<p>Sometimes the problem is not from Mambo itself, but from poorly written third-party components that don&#8217;t give any shit about security (why don&#8217;t you write a big &#8220;hack me&#8221; sign on the front page while you&#8217;re chmod 777-ing all your files?). But as far as I know, Mambo doesn&#8217;t seem to have any built-in protection from poorly written third-party components. I&#8217;m by no means a Mambo expert, so I could be wrong. And please <em>do</em> correct me if I&#8217;m wrong.</p>

<p>I&#8217;ve had enough of these kiddie idiots running around thinking they&#8217;re cool hackers. The thing is I don&#8217;t have time to investigate why Mambo or its third-party components that were installed was broken. Luckily, there is a pattern in all of the incidents: they all exploit <code>mosConfig_absolute_path</code> remote script execution (thanks to PHP&#8217;s ability to include()/require() files over HTTP). In many cases I could disable <code>allow_url_include</code> and/or <code>allow_url_fopen</code> in php.ini, but in certain cases it&#8217;s needed, so I couldn&#8217;t disable it. So I wrote a quick fix using Apache&#8217;s <code>mod_rewrite</code> and put it in a <code>.htaccess</code> file:</p>

<pre><code>RewriteEngine On
RewriteCond %{QUERY_STRING} mosConfig_absolute_path= [NC]
RewriteRule ^.*$ http://%{SERVER_NAME}/? [R]
</code></pre>

<p>This will redirect all exploit attempts to the front page, so adjust to your environment. You can change <code>mosConfig_absolute_path=</code> to just <code>mosConfig</code> if you want to be really anal. As I said, I&#8217;m not a Mambo expert, so I don&#8217;t know if something like this can or should be included in the default <code>.htaccess</code> that comes with Mambo. People more familiar with Mambo can figure that out. In the meantime, this small hack should deter the kiddies.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2007/07/09/mambo-mod_rewrite-security-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trash Those Penny Stock Spam</title>
		<link>http://ronny.haryan.to/archives/2006/12/19/trash-those-penny-stock-spam/</link>
		<comments>http://ronny.haryan.to/archives/2006/12/19/trash-those-penny-stock-spam/#comments</comments>
		<pubDate>Tue, 19 Dec 2006 08:05:54 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2006/12/19/trash-those-penny-stock-spam/</guid>
		<description><![CDATA[May God forgive all the spammers&#8217; souls. Meanwhile, I use this procmail recipe: :0B * ^Symbol: +[A-Z][A-Z][A-Z][A-Z] * ^Current Price: +\$[0-9]\. * Term Target( Price)?: +\$ /dev/null This one recipe alone reduces my daily spam by about half! I get about 500 to 1,000 spam emails daily. This is the only reason I reactivated my [...]]]></description>
			<content:encoded><![CDATA[<p>May God forgive all the spammers&#8217; souls.</p>

<p>Meanwhile, I use this <a href="http://www.google.com/search?q=procmail">procmail</a> recipe:</p>

<pre><code>:0B
* ^Symbol: +[A-Z][A-Z][A-Z][A-Z]
* ^Current Price: +\$[0-9]\.
* Term Target( Price)?: +\$
/dev/null
</code></pre>

<p>This one recipe alone reduces my daily spam by about <strong>half</strong>! I get about 500 to 1,000 spam emails daily. This is the only reason I reactivated my procmail. My <a href="http://en.wikipedia.org/wiki/Bayesian_spam_filtering">Bayesian filter</a>, which has been working wonderfully for years now, caught all the penny stock spam just fine, it&#8217;s just that it&#8217;s really annoying and harder for me to go through these penny stock spam when checking my spam folder for false positives.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2006/12/19/trash-those-penny-stock-spam/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mail Testing Tricks</title>
		<link>http://ronny.haryan.to/archives/2006/10/20/mail-testing-tricks/</link>
		<comments>http://ronny.haryan.to/archives/2006/10/20/mail-testing-tricks/#comments</comments>
		<pubDate>Fri, 20 Oct 2006 12:00:19 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2006/10/20/mail-testing-tricks/</guid>
		<description><![CDATA[Here are some MTA (mail server) tricks that I use at work for testing an email application that we&#8217;re working on. I wanted to do a rough benchmarking on how fast our email app can pump messages to the MTA. Of course I don&#8217;t want to actually send the emails, I don&#8217;t care where it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some MTA (mail server) tricks that I use at work for testing an email application that we&#8217;re working on.</p>

<p>I wanted to do a rough benchmarking on how fast our email app can pump messages to the MTA. Of course I don&#8217;t want to actually send the emails, I don&#8217;t care where it&#8217;s sent to or what the content is, the MTA should just accept then drop them straight away.</p>

<p>I&#8217;m using <a href="http://www.postfix.org/">Postfix</a>. So I have the email app send 50,000 emails to <code>x@blackhole.localdomain</code>, where <code>x</code> is a number between 1 and 50,000. You can also do this easily with <code>smtp-source</code> program that comes with Postfix. In <code>/etc/hosts</code> I added <code>127.0.0.1 blackhole.localdomain</code>, and then I set <tt>$<a href="http://www.postfix.org/postconf.5.html#transport_maps">transport_maps</a></tt> to <code>hash:/etc/postfix/transport</code> and in <code>/etc/postfix/transport</code> I added <code>blackhole.localdomain blackhole:</code> and ran <code>postmap /etc/postfix/transport</code>. This will make everything sent to blackhole.localdomain to be sent via the &#8216;blackhole&#8217; <a href="http://www.postfix.org/transport.5.html">transport</a>, which we need to define in <a href="http://www.postfix.org/master.5.html">master.cf</a> as follows:</p>

<pre><code>blackhole unix  -       n       n       -       -       pipe
    user=nobody argv=/bin/true ${user}
</code></pre>

<p>The mail logs should tell us whether it&#8217;s working or not.</p>

<p>Another thing that sometimes I wanted to do is to capture the actual emails sent after it reaches the MTA but <em>without</em> the MTA actually sending the mail to the recipients. This is to get a better picture of how the emails will look like to the recipients. This is useful, for example, to verify that headers, newlines, charset, encoding, MIME, etc. are generated correctly. With Postfix, I used <a href="http://www.postfix.org/FILTER_README.html">content_filter</a> and did something like this in master.cf.</p>

<pre><code>pickup    fifo  n       -       -       60      1       pickup
    -o content_filter=dbgcapture
20025     inet  n       -       -       -       -       smtpd
    -o content_filter=dbgcapture
20026     inet  n       -       -       -       -       smtpd
    -o debug_peer_list=127.0.0.1,192.168.1.0/24
    -o content_filter=dbgcapture
dbgcapture unix  -       n       n       -       -       pipe
  flags=FR user=ronny argv=/usr/bin/tee -a /tmp/capture.mbox
</code></pre>

<p>Mails sent via SMTP to <tt>$<a href="http://www.postfix.org/postconf.5.html#inet_interfaces">inet_interfaces</a>:20025</tt> and sent via <code>/usr/sbin/sendmail</code> will be captured in <code>/tmp/capture.mbox</code>. Similarly, port 20026, with additional SMTP debugging in the logs. Port 25 still works as usual. If you don&#8217;t want <code>/usr/sbin/sendmail</code> to go to dbgcapture simply comment out the <code>-o content_filter</code> line right after the pickup line. Note that using <code>/usr/bin/tee</code> here may not be the most efficient/correct. It works most of the time, but it&#8217;s asynchronous and it doesn&#8217;t guarantee all mails will be written in the correct order (or at all) in the mbox. If you can suggest a better way with similar level of ease, please let me know.</p>

<p>I was also looking at capturing mails with Sendmail. It&#8217;s possible using <a href="http://www.roaringpenguin.com/penguin/openSourceProducts/mimeDefang">MIMEDefang</a> milter with <code>action_quarantine_whole_email()</code> followed by <code>action_discard()</code>. It works but somehow it ran slower than a snail. I&#8217;m not that familiar with Sendmail. Meh. No big deal. I left the tests running, I went home, and check the test results the next morning.</p>

<p>In the next few months we will be doing a lot more of this kind of tests, so I&#8217;m planning to do similar thing with qmail and Exim to cover a lot more base.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2006/10/20/mail-testing-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Remove Duplicate Emails with Mutt</title>
		<link>http://ronny.haryan.to/archives/2005/06/15/tip-remove-duplicate-emails-with-mutt/</link>
		<comments>http://ronny.haryan.to/archives/2005/06/15/tip-remove-duplicate-emails-with-mutt/#comments</comments>
		<pubDate>Wed, 15 Jun 2005 05:31:30 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/?p=66</guid>
		<description><![CDATA[Mutt has a little-known feature to detect duplicate messages. I&#8217;m quite sure it detects duplicates by their Message-ID header, but it could be from something else in addition to that. You can do a pattern match duplicate messages in a mailbox and do whatever with them, e.g. delete or move them somewhere else. Let say [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mutt.org">Mutt</a> has a little-known feature to detect duplicate messages. I&#8217;m quite sure it detects duplicates by their Message-ID header, but it could be from something else in addition to that. You can do a pattern match duplicate messages in a mailbox and do whatever with them, e.g. delete or move them somewhere else.</p>

<p>Let say you want to delete all duplicate messages in the current mailbox. Just do a <code>tag-pattern</code> (bound to <code>T</code> here), put in <code>~=</code> as the pattern, then all duplicates will be tagged. After that, you can delete tagged messages (bound to <code>;d</code>, or just <code>d</code> if you have <code>$auto_tag=yes</code>).</p>

<p>Duplicate messages are also indicated by <code>=</code> in the thread if you sort the messages by thread and you have <code>$duplicates_thread=yes</code> (it&#8217;s yes by default). </p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2005/06/15/tip-remove-duplicate-emails-with-mutt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: History Search in Bash</title>
		<link>http://ronny.haryan.to/archives/2005/03/14/tip-history-search-in-bash/</link>
		<comments>http://ronny.haryan.to/archives/2005/03/14/tip-history-search-in-bash/#comments</comments>
		<pubDate>Mon, 14 Mar 2005 12:52:11 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2005/03/14/tip-history-search-in-bash/</guid>
		<description><![CDATA[If: you find yourself typing the same long command in the shell repeatedly, or you want to recall some command that you have executed yesterday, or you don&#8217;t remember the exact options you recently used but you know the command or parts of the command line, then you might be interested in this. The Bash [...]]]></description>
			<content:encoded><![CDATA[<p>If:</p>

<ul>
<li>you find yourself typing the same long command in the shell repeatedly, or</li>
<li>you want to recall some command that you have executed yesterday, or</li>
<li>you don&#8217;t remember the exact options you recently used but you know the command or parts of the command line,</li>
</ul>

<p>then you might be interested in this.</p>

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

<p>The Bash shell has some built-in functions that can be bound to keys, including functions to search the command line history. By default the <code>reverse-search-history</code> function is bound to <code>Ctrl-r</code>, and the contra <code>forward-search-history</code> to <code>Ctrl-s</code>. This is an incremental search, and mostly useful <em>if you remember only the middle bits of a command line</em>. There are two others: <code>non-incremental-reverse-search-history</code> (bound to <code>Meta-p</code> by default; Meta could be Alt or Esc) and <code>non-incremental-forward-search-history</code> (<code>Meta-n</code>). All four of them do not let you go to the next match if there are multiple matches, only the first match is shown, so you need to use the most unique part of the command line to get the one you want.</p>

<p>The most useful functions, at least for me, are actually not bound to any keys by default, which is a shame. They are <code>history-search-forward</code> and <code>history-search-backward</code>. I use them <strong>a lot</strong>. So the first thing I do (after changing password) when I got a new account with a bash shell is to add these lines to <code>$HOME/.inputrc</code> (unless it&#8217;s overriden with the env var <code>$INPUTRC</code>) and re-login:</p>

<pre><code>"\C-f": history-search-backward
"\C-g": history-search-forward
</code></pre>

<p>Using these two functions I can type the first few letters of the command I have previously run, then I keep pressing <code>Ctrl-f</code> until I find the command that I want, and <code>Ctrl-g</code> to go back to the opposite search direction.</p>

<p>By the way, you can always use <code>alias</code> to create a shorthand for a long command. And everyone uses the <code>Tab</code> button regularly, right? You&#8217;d be insane not to do that anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2005/03/14/tip-history-search-in-bash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tip: Quick no-highlight-search-matches in Vim</title>
		<link>http://ronny.haryan.to/archives/2005/03/03/tip-quick-no-highlight-search-matches-in-vim/</link>
		<comments>http://ronny.haryan.to/archives/2005/03/03/tip-quick-no-highlight-search-matches-in-vim/#comments</comments>
		<pubDate>Thu, 03 Mar 2005 00:45:53 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2005/03/03/tip-quick-no-highlight-search-matches-in-vim/</guid>
		<description><![CDATA[Somebody asked how to quickly disable search matches highlighting in vim because it tends to be distractful after a while. Vim has hlsearch and the corresponding nohlsearch to toggle this behaviour (see :help hlsearch for more info). So we could create mappings to quickly disable hlsearch, for example I use F12 for this. map &#60;F12&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Somebody <a href="http://www.mail-archive.com/tanya-jawab@linux.or.id/msg21265.html">asked</a> how to quickly disable search matches highlighting in <a href="http://www.vim.org">vim</a> because it tends to be distractful after a while.</p>

<p>Vim has <code>hlsearch</code> and the corresponding <code>nohlsearch</code> to toggle this behaviour (see <code>:help hlsearch</code> for more info). So we could create mappings to quickly disable hlsearch, for example I use <code>F12</code> for this.</p>

<pre>map     &lt;F12&gt;   :nohlsearch&lt;CR&gt;
imap    &lt;F12&gt;   &lt;ESC&gt;:nohlsearch&lt;CR&gt;i
vmap    &lt;F12&gt;   &lt;ESC&gt;:nohlsearch&lt;CR&gt;gv
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2005/03/03/tip-quick-no-highlight-search-matches-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Blurred Background</title>
		<link>http://ronny.haryan.to/archives/2004/10/13/tip-blurred-background/</link>
		<comments>http://ronny.haryan.to/archives/2004/10/13/tip-blurred-background/#comments</comments>
		<pubDate>Wed, 13 Oct 2004 01:18:42 +0000</pubDate>
		<dc:creator>ronny</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://ronny.haryan.to/archives/2004/10/13/tip-blurred-background/</guid>
		<description><![CDATA[Many times I came across pictures that I thought would look great for my desktop background wallpaper. However, after I set them to be my wallpaper, they were so good that they looked too &#8220;sharp&#8221; and they made it hard to distinguish between the desktop items and the wallpaper. (I know some people like having [...]]]></description>
			<content:encoded><![CDATA[<p>Many times I came across pictures that I thought would look great for my desktop background wallpaper. However, after I set them to be my wallpaper, they were so good that they looked too &#8220;sharp&#8221; and they made it hard to distinguish between the desktop items and the wallpaper. (I know <a href="http://priyadi.net/">some people</a> like having a clean desktop with nothing on it, but I beg to differ.)</p>

<p>I don&#8217;t remember exactly how I came up with the idea, I think I saw one of <a href="http://tigert.gimp.org/">tigert</a>&#8216;s wallpapers, it was blurred. It seemed strange at the moment, I thought &#8220;Who would want to look at a blurry picture?&#8221;, but I gave it a try anyway. And it actually looked good, it created the illusion that the wallpaper is pushed farther to the background. Just like when you take a photo of your friend, for example, you focus on your friend and not the background.</p>

<p>It&#8217;s very easy to blur a picture using <a href="http://www.gimp.org/">GIMP</a>. Simply open the original picture, and apply one of the blur effects/filters, I normally use Gaussian Blur (RLE) with a radius of 5 pixels. You could experiment with other filters and the radius because your screen size (or &#8220;resolution&#8221;) might be different from mine. This simple trick works great on scenery type of pictures but not celebrity close-up photos and the like.</p>

<p>Original:</p>

<p><img src="/files/non-blurred-bg-2004-10-13.jpg" alt="Original" class="centered" /></p>

<p>Blurred:</p>

<p><img src="/files/blurred-bg-2004-10-13.jpg" alt="blurred background" class="centered" /></p>
]]></content:encoded>
			<wfw:commentRss>http://ronny.haryan.to/archives/2004/10/13/tip-blurred-background/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
