<?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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>noiselabs.org</title>
	
	<link>http://blog.noiselabs.org</link>
	<description>yet another lighthouse for Linux geeks and code monkeys</description>
	<lastBuildDate>Sat, 31 Mar 2012 01:04:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/noiselabs" /><feedburner:info uri="noiselabs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Assetic in SmartyBundle</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/gj0ZjsQiu-c/</link>
		<comments>http://blog.noiselabs.org/2012/assetic-in-smartybundle/#comments</comments>
		<pubDate>Sat, 31 Mar 2012 01:04:17 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[assetic]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[smarty]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://blog.noiselabs.org/?p=458</guid>
		<description><![CDATA[Being an &#8220;unofficial&#8221; template engine in Symfony2, Smarty(Bundle) needs to catch up with its Twig and PHP counterparts to provide the same integration and range of features. One of the features missing in SmartyBundle was until recently Assetic. Assetic Assetic is an asset management framework for PHP written by Kris Wallsmith. Although this library is available for&#8230;]]></description>
			<content:encoded><![CDATA[<p>Being an &#8220;unofficial&#8221; template engine in Symfony2, Smarty(Bundle) needs to catch up with its Twig and PHP counterparts to provide the same integration and range of features. One of the features missing in SmartyBundle was until recently <a title="Assetic @GitHub" href="https://github.com/kriswallsmith/assetic">Assetic</a>.</p>
<h2>Assetic</h2>
<p><a href="https://github.com/kriswallsmith/assetic">Assetic</a> is an asset management framework for PHP written by Kris Wallsmith. Although this library is available for every PHP project I&#8217;m focusing in Symfony2 integration.</p>
<p>For a complete overview of the usage of Assetic in Symfony context please refer to the following cookbook entries:</p>
<ul>
<li><a href="http://symfony.com/doc/current/cookbook/assetic/asset_management.html">Symfony2 &#8211; How to Use Assetic for Asset Management</a></li>
<li><a href="http://symfony.com/doc/current/cookbook/assetic/yuicompressor.html">Symfony2 - How to Minify JavaScripts and Stylesheets with YUI Compressor</a></li>
</ul>
<p>&nbsp;</p>
<h2>Usage in SmartyBundle</h2>
<p>SmartyBundle provides the same <em>javascripts</em>, <em>stylesheets</em> and <em>image</em> functions supported in Twig and PHP engines. Usage is quite similar to Twig.</p>
<h4>Javascripts</h4>
<div class="codecolorer-container smarty blackboard" style="border:1px solid #9F9F9F;width:435px;"><div class="smarty codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #D36900;">&#123;</span>javascripts<br />
assets<span style="color: #D36900;">=</span><span style="color: #ff0000;">'@AcmeFooBundle/Resources/public/js/*'</span><br />
<span style="color: #D36900;">&#125;</span><br />
<span style="color: #009000;">&lt;script type=&quot;text/javascript&quot; src=&quot;{$asset_url}&quot;&lt;/script&gt;</span><br />
<span style="color: #D36900;">&#123;</span><span style="color: #D36900;">/</span>javascripts<span style="color: #D36900;">&#125;</span></div></div>
<p>&nbsp;</p>
<h4>Stylesheets</h4>
<p>To bring in CSS stylesheets, you can use the same methodologies seen in this entry, except with the <strong>stylesheets</strong> tag:</p>
<div class="codecolorer-container smarty blackboard" style="border:1px solid #9F9F9F;width:435px;"><div class="smarty codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #D36900;">&#123;</span>stylesheets<br />
assets<span style="color: #D36900;">=</span><span style="color: #ff0000;">'@AcmeFooBundle/Resources/public/css/*'</span><br />
<span style="color: #D36900;">&#125;</span><br />
<span style="color: #009000;">&lt;link rel=&quot;stylesheet&quot; href=&quot;{$asset_url}&quot; /&gt;</span><br />
<span style="color: #D36900;">&#123;</span><span style="color: #D36900;">/</span>stylesheets<span style="color: #D36900;">&#125;</span></div></div>
<p>&nbsp;</p>
<h4>Combining Assets</h4>
<p>You can also combine several files into one. This helps to reduce the number of HTTP requests, which is great for front end performance. It also allows you to maintain the files more easily by splitting them into manageable parts. This can help with re-usability as you can easily split project-specific files from those which can be used in other applications, but still serve them as a single file.</p>
<p>Using the same javascripts example as above. Note the usage of commas to separate assets.</p>
<div class="codecolorer-container smarty blackboard" style="border:1px solid #9F9F9F;width:435px;"><div class="smarty codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #D36900;">&#123;</span>javascripts<br />
assets<span style="color: #D36900;">=</span><span style="color: #ff0000;">'@AcmeFooBundle/Resources/public/js/*,<br />
@AcmeBarBundle/Resources/public/js/form.js,<br />
@AcmeBarBundle/Resources/public/js/calendar.js'</span><br />
<span style="color: #D36900;">&#125;</span><br />
<span style="color: #009000;">&lt;script src=&quot;{$asset_url}&quot;&gt;&lt;/script&gt;</span><br />
<span style="color: #D36900;">&#123;</span><span style="color: #D36900;">/</span>javascripts<span style="color: #D36900;">&#125;</span></div></div>
<p>In the dev environment, each file is still served individually, so that you can debug problems more easily. However, in the prod environment, this will be rendered as a single script tag.</p>
<p>&nbsp;</p>
<h4>Block attributes</h4>
<p>Here is a list of the possible attributes to define in the block function.</p>
<ul>
<li><strong>assets</strong>: A comma-separated list of files to include in the build (CSS, JS or image files)</li>
<li><strong>debug</strong>: If set to true, the plugin will not combine your assets to allow easier debug</li>
<li><strong>filter</strong>: A coma-separated list of filters to apply.</li>
<li><strong>combine</strong>: Combine all of your CSS and JS files (overrides `debug`)</li>
<li><strong>output</strong>: Defines the URLs that Assetic produces</li>
<li><strong>var_name</strong>: The variable name that will be used to pass the asset URL to the &lt;link&gt; tag</li>
</ul>
<p>&nbsp;</p>
<h4>Full example</h4>
<p>And now here goes an example using all available attributes:</p>
<div class="codecolorer-container smarty blackboard" style="border:1px solid #9F9F9F;width:435px;"><div class="smarty codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #D36900;">&#123;</span>javascripts<br />
assets<span style="color: #D36900;">=</span><span style="color: #ff0000;">'@AcmeFooBundle/Resources/public/js/*,<br />
@AcmeBarBundle/Resources/public/js/form.js,<br />
@AcmeBarBundle/Resources/public/js/calendar.js'</span><br />
filter<span style="color: #D36900;">=</span><span style="color: #ff0000;">'yui_js'</span><br />
output<span style="color: #D36900;">=</span><span style="color: #ff0000;">'js/compiled/main.js'</span><br />
var_name<span style="color: #D36900;">=</span><span style="color: #ff0000;">'js_url'</span><br />
<span style="color: #D36900;">%</span><span style="color: #D36900;">&#125;</span><br />
<span style="color: #009000;">&lt;script src=&quot;{$js_url}&quot;&gt;&lt;/script&gt;</span></div></div>
<p>&nbsp;</p>
<h4>This is work in progress</h4>
<p>That&#8217;s right, Assetic support in SmartyBundle still requires some real world usage to get rid of its sharp edges and bring it to production level. If you are able to give it a try, test it for a bit and bring your complains over to <a href="https://github.com/noiselabs/SmartyBundle/issues">SmartyBundle issue tracker</a>. I&#8217;ll appreciate it!</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/gj0ZjsQiu-c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2012/assetic-in-smartybundle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2012/assetic-in-smartybundle/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=assetic-in-smartybundle</feedburner:origLink></item>
		<item>
		<title>Introducing SmartyBundle, a Smarty3 bundle for Symfony2</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/1X0V9r9An5c/</link>
		<comments>http://blog.noiselabs.org/2011/introducing-smartybundle-a-smarty3-bundle-for-symfony2/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 22:30:57 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bundle]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smarty]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://blog.noiselabs.org/?p=437</guid>
		<description><![CDATA[Hello all! I&#8217;ve released yesterday the first version of SmartyBundle on GitHub. &#160; SmartyBundle is Symfony2 a bundle that provides integration for the Smarty3 template engine. It will allow the usage of the Smarty template engine in Symfony2, instead of Twig or PHP templates. SmartyBundle is released under a LPGLv3 license. To download it you may: Git-clone-it: $ git&#8230;]]></description>
			<content:encoded><![CDATA[<p>Hello all! I&#8217;ve released yesterday the first version of <strong><a href="https://github.com/noiselabs/SmartyBundle">SmartyBundle</a></strong> on GitHub.</p>
<p>&nbsp;</p>
<p>SmartyBundle is <strong><a title="Symfony2 website" href="http://symfony.com/">Symfony2</a></strong> a <a href="http://symfony.com/doc/current/book/page_creation.html#page-creation-bundles">bundle</a> that provides integration for the <strong><a title="Smarty template engine" href="http://www.smarty.net/">Smarty3</a></strong> template engine. It will allow the usage of the Smarty template engine in Symfony2, instead of Twig or PHP templates. SmartyBundle is released under a LPGLv3 license. To download it you may:</p>
<p>Git-clone-it:</p>
<pre class="nl-shell">$ git clone https://github.com/noiselabs/SmartyBundle.git</pre>
<p>or download the repository as a zip file:</p>
<pre><a href="https://github.com/noiselabs/SmartyBundle/zipball/master">https://github.com/noiselabs/SmartyBundle/zipball/master</a></pre>
<p>&nbsp;</p>
<p>Full documentation is available on <a href="https://github.com/noiselabs/SmartyBundle/blob/master/Resources/doc/index.rst">GitHub</a> and after download in the <em>Resources/doc/</em> folder.</p>
<p>&nbsp;</p>
<h4>What is Symfony</h4>
<p>Symfony is a Open Source PHP Web Development Framework. It is currently my PHP framework of choice that first grabbed my attention by its <a title="Symfony Components" href="http://symfony.com/components">standalone components</a> and got me back to PHP after digging into the, Python-based, <a title="TurboGears Web framework" href="http://turbogears.org/">TurboGears</a> Web framework.</p>
<p>&nbsp;</p>
<h4>What is Smarty</h4>
<p>Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Version 3 brings some important improvements like the addition of template inheritance and a complete code rewrite to make use of new PHP5 capabilities.</p>
<p>&nbsp;</p>
<h4>Try it!</h4>
<p>I welcome everyone interested to try it, test it and to improve its code by sending comments, suggestions and GitHub pull requests. Bugs and feature requests are tracked on <a href="https://github.com/noiselabs/SmartyBundle/issues">GitHub</a>.</p>
<p>&nbsp;</p>
<p>Thanks and see you soon <img src='http://blog.noiselabs.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/1X0V9r9An5c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2011/introducing-smartybundle-a-smarty3-bundle-for-symfony2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2011/introducing-smartybundle-a-smarty3-bundle-for-symfony2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=introducing-smartybundle-a-smarty3-bundle-for-symfony2</feedburner:origLink></item>
		<item>
		<title>Failed to submit batch buffer (Xorg)</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/nMkObLl8H_A/</link>
		<comments>http://blog.noiselabs.org/2011/failed-to-submit-batch-buffer-xorg/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 18:19:52 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[Gentoo]]></category>

		<guid isPermaLink="false">http://blog.noiselabs.org/?p=395</guid>
		<description><![CDATA[Another Xorg update&#8230; After my last Xorg update I&#8217;ve lost the nice ability to log into my KDE. Well, this *sucks* because I spent a long time compiling kdelibs and friends so I really want to use it. Symptoms A blank screen on login. You can even see your mouse pointer but nothing else. If&#8230;]]></description>
			<content:encoded><![CDATA[<h4>Another Xorg update&#8230;</h4>
<p>After my last Xorg update I&#8217;ve lost the nice ability to log into my KDE. Well, this *sucks* because I spent a long time compiling kdelibs and friends so I really want to use it.</p>
<h4>Symptoms</h4>
<p>A blank screen on <em><insert preferred window manager here></em> login. You can even see your mouse pointer but nothing else.</p>
<p>If you take a look at the Xorg log you&#8217;ll see X is mad about a &#8220;batch buffer thingie&#8221;.</p>
<pre class="nl-shell">
Error in /var/log/Xorg.0.log:
(EE) intel(0): Failed to submit batch buffer, expect rendering corruption or even a frozen display: No such device
</pre>
<h4>The Solution</h4>
<p>Pretty ease to solve this one. Either <strong>upgrade your kernel to something like 2.6.36 or better</strong> (recommended) or block xf86-video-intel>2.14.</p>
<p><strong>Permanent solution</strong><br />
Upgrade your kernel. I was running an old 2.6.32-tuxonice-r7. Upgraded to 2.6.36 and&#8230; Welcome back, KDE.</p>
<pre class="nl-shell">
# emerge --sync &#038;&#038; emerge --update gentoo-sources
</pre>
<p><strong>Workaround (if you&#8217;re in a hurry)</strong><br />
Add this to <em>/etc/portage/package.mask</em></p>
<pre>
>=x11-drivers/xf86-video-intel-2.14.0
</pre>
<p>and recompile.</p>
<pre class="nl-shell">
<span class="nl-prompt">#</span> emerge --update x11-drivers/xf86-video-intel
</pre>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/nMkObLl8H_A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2011/failed-to-submit-batch-buffer-xorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2011/failed-to-submit-batch-buffer-xorg/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=failed-to-submit-batch-buffer-xorg</feedburner:origLink></item>
		<item>
		<title>Sanitize filenames with PHP</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/8iN5HxZdxWk/</link>
		<comments>http://blog.noiselabs.org/2011/sanitize-filenames-with-php/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 17:13:37 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[datatables]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tabletools]]></category>

		<guid isPermaLink="false">http://blog.noiselabs.org/?p=371</guid>
		<description><![CDATA[PDF generation and invalid characters&#8230; While working with the TableTools PDF generator included in the great DataTables jQuery plugin I&#8217;ve noticed that sometimes the script failed to generate the PDF file. The cause? Invalid characters in the filename. Well, to solve this issue I&#8217;ve made a simple PHP function to return a safe version of&#8230;]]></description>
			<content:encoded><![CDATA[<h4>PDF generation and invalid characters&#8230;</h4>
<p>While working with the <a href="http://www.datatables.net/extras/tabletools/">TableTools</a> PDF generator included in the great <a href="http://www.datatables.net/">DataTables</a> jQuery plugin I&#8217;ve noticed that sometimes the script failed to generate the PDF file. The cause? Invalid characters in the filename.</p>
<p>Well, to solve this issue I&#8217;ve made a simple PHP function to return a safe version of the given filename.</p>
<h4>How it works?</h4>
<p>Reads a filename string and replace each &#8220;dangerous&#8221; character with an underscore. Of course you can use any other &#8220;safe&#8221; character instead of an underscore.</p>
<h4>The Code</h4>
<div class="codecolorer-container php vibrant" style="border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* Helper holds a collection of static methods, useful for generic purposes<br />
&nbsp;*<br />
&nbsp;* @author Vítor Brandão &lt;noisebleed@noiselabs.org&gt;<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">class</span> Helper<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* Returns a safe filename, for a given platform (OS), by replacing all<br />
&nbsp; &nbsp; &nbsp;* dangerous characters with an underscore.<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @since 0.1.0<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @param string $dangerous_filename The source filename to be &quot;sanitized&quot;<br />
&nbsp; &nbsp; &nbsp;* @param string $platform The target OS<br />
&nbsp; &nbsp; &nbsp;*<br />
&nbsp; &nbsp; &nbsp;* @return Boolean string A safe version of the input filename<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> sanitizeFileName<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dangerous_filename</span><span style="color: #339933;">,</span> <span style="color: #000088;">$platform</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Unix'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/strtolower"><span style="color: #990000;">strtolower</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$platform</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'unix'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'linux'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// our list of &quot;dangerous characters&quot;, add/remove characters if necessary</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$dangerous_characters</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&amp;&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;?&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;#&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// no OS matched? return the original filename then...</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$dangerous_filename</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// every forbidden character is replace by an underscore</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dangerous_characters</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$dangerous_filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;">// usage:</span><br />
<span style="color: #000088;">$safe_filename</span> <span style="color: #339933;">=</span> Helper<span style="color: #339933;">::</span><span style="color: #004000;">sanitizeFileName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'#my &nbsp;unsaf&amp;/file\name?&quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span>;</div></div>
<h4>Download this and more&#8230;</h4>
<p>This snippet and other useful [at least, I hope so] PHP methods are grouped on a git repo available via GitHub. This is also the best [and only] way to get the updated version of the code.</p>
<p>Go to the <a href="https://github.com/noiselabs/noiselabs-php-toolkit">project&#8217;s web page on GitHub</a> or download it right way with (you must have <a href="http://git-scm.com/">Git</a> installed first):</p>
<pre class="nl-shell">$ git clone git://github.com/noiselabs/noiselabs-php-toolkit.git</pre>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/8iN5HxZdxWk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2011/sanitize-filenames-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2011/sanitize-filenames-with-php/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sanitize-filenames-with-php</feedburner:origLink></item>
		<item>
		<title>Don't let updatedb take your Linux down</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/BARoP3yyS74/</link>
		<comments>http://blog.noiselabs.org/2010/dont-let-updatedb-take-your-linux-down/#comments</comments>
		<pubDate>Sat, 01 May 2010 16:37:10 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://noisebleed.blogetery.com/?p=313</guid>
		<description><![CDATA[Coffee break everyone? Everyday morning was the same: updatedb came and took my Gentoo away. The symptoms were clear, X/KDE applications starting to become slow and unresponsive, and then the two inevitable choices: go for a coffee and wait or pkill the bastard. Asking updatedb to be nice (the wrong way) To fix this came&#8230;]]></description>
			<content:encoded><![CDATA[<h4>Coffee break everyone?</h4>
<p>Everyday morning was the same: <strong>updatedb</strong> came and took my Gentoo away. The symptoms were clear, X/KDE applications starting to become <strong>slow and unresponsive</strong>, and then the two inevitable choices: go for a coffee and wait or pkill the bastard.</p>
<h4>Asking updatedb to be nice (<em>the wrong way</em>)</h4>
<p>To fix this came to my mind the nice command. This is well known to Gentoo users because of the PORTAGE_NICENESS feature include in make.conf. Nice is a program that adjusts the process scheduling (aka niceness) of the desired programs so setting a value of 19 (the maximum) would make updatedb to be &#8220;nicer&#8221; to other applications and thereforeÂ being less bossy. So I&#8217;ve edited /etc/cron.daily/slocate, placed &#8220;nice -n 19&#8243; before the updatedb command and waited. But, once again, updatedb came and owned my computer.</p>
<h4>Asking updatedb to be I/O-nice (<em>the right way</em>)</h4>
<p>So. what&#8217;s wrong here? Updatedb is not a CPU-intensive application so nice won&#8217;t change a thing. The bottleneck is disk access so what we need here is a <strong>nice for I/O</strong>. The solution? <strong>Ionice</strong>.</p>
<p>Ionice is able to set the I/O scheduling class and priority for a given program. To give updatedb a low priority we pick the class 3, the idle one.</p>
<p>Again, let&#8217;s go to crontab and edit the slocate entry.</p>
<pre lang="bash"># vim /etc/cron.daily/slocate</pre>
<p>Put ionice -c 3 before the updatedb command.</p>
<pre lang="bash">#! /bin/sh

if [ -x /usr/bin/updatedb ]
then
        if [ -f /etc/updatedb.conf ]
        then
                ionice -c 3 /usr/bin/updatedb
        else
                ionice -c 3 /usr/bin/updatedb -f proc
        fi
fi</pre>
<p>And if you&#8217;re asking where (in Gentoo) is this ionice program, the solution is <strong>sys-apps/util-linux</strong>, which I&#8217;m pretty sure is already installed. If not: <em>emerge -a sys-apps/util-linux</em>.</p>
<h4>This is all good but&#8230; what&#8217;s this updatedb thing?</h4>
<p>Updatedb is a tool ran daily by cron to update the slocate database. And <strong>Slocate</strong> (Secure Locate) is a security enhanced version of the GNU Locate, which is used to <strong>index all the files</strong> of your system allowing a (very) <strong>quick search</strong> of them. In Gentoo Linux the slocate is available in Portage through <strong>sys-apps/slocate</strong>.</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/BARoP3yyS74" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2010/dont-let-updatedb-take-your-linux-down/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2010/dont-let-updatedb-take-your-linux-down/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dont-let-updatedb-take-your-linux-down</feedburner:origLink></item>
		<item>
		<title>Meme Miner: the translation tool I've been looking for</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/22_iUBo7Ooo/</link>
		<comments>http://blog.noiselabs.org/2010/meme-miner-the-translation-tool-ive-been-looking-for/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 23:23:52 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://noisebleed.blogetery.com/?p=291</guid>
		<description><![CDATA[No, this will not replace Google Translate or Babel Fish. But it does something that these tools simply can&#8217;t offer. For some time I&#8217;ve been using Wikipedia to translate expressions that a normal translator couldn&#8217;t give exact results, because they use literal translations. Now there is a faster way. MemeMiner, brought to us by Fred&#8230;]]></description>
			<content:encoded><![CDATA[<p>No, this will not replace <a href="http://translate.google.com">Google Translate</a> or <a href="http://babelfish.yahoo.com">Babel Fish</a>. But it does something that these tools simply can&#8217;t offer.</p>
<p>For some time I&#8217;ve been using <a href="http://www.wikipedia.org/">Wikipedia</a> to translate expressions that a normal translator couldn&#8217;t give exact results, because they use literal translations. Now there is a faster way.</p>
<p><strong>MemeMiner</strong>, brought to us by <a href="http://fredrocha.net">Fred Rocha</a>, is a Web tool that does this work and gives us a easy and fast way to get this translations.</p>
<p>From the author own words:</p>
<blockquote><p>For most of it&#8217;s articles, Wikipedia provides the equivalent expression of that concept in other languages.<br />
With MemeMiner you can effortlessly find out how a certain idea is expressed across the language spectrum.</p></blockquote>
<p>Now go ahead and try this tool at <a href="http://fredrocha.net/MemeMiner/">http://fredrocha.net/MemeMiner/</a></p>
<div id="attachment_292" class="wp-caption alignleft" style="width: 566px"><a href="http://fredrocha.net/MemeMiner/"><img class="size-full wp-image-292   " title="Meme Miner Webpage" src="http://noisebleed.blogetery.com/files/2010/03/fredrocha-mememiner.jpg" alt="Meme Miner webpage" width="556" height="269" /></a><p class="wp-caption-text">Meme Miner webpage</p></div>
<p>Thanks Fred!</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/22_iUBo7Ooo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2010/meme-miner-the-translation-tool-ive-been-looking-for/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2010/meme-miner-the-translation-tool-ive-been-looking-for/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=meme-miner-the-translation-tool-ive-been-looking-for</feedburner:origLink></item>
		<item>
		<title>Ebuild for CoovaChilli v1.2.2 coming soon</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/qXBb1_OmPuA/</link>
		<comments>http://blog.noiselabs.org/2010/ebuild-for-coovachilli-v1-2-2-coming-soon/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 00:56:09 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[chillispot]]></category>
		<category><![CDATA[coova-chilli]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[layman]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[sunrise]]></category>

		<guid isPermaLink="false">http://noisebleed.blogetery.com/?p=248</guid>
		<description><![CDATA[It has been a while since I took Laurento Fritella contributions on bugzilla for CoovaChilli-1.0.11 and made them available through Sunrise overlay. In the meantime I&#8217;ve tried to submit version 1.0.14 but run into some problems with SSL and I was back then completely out of time to fix it. Ebuild for version 1.0.11 remains&#8230;]]></description>
			<content:encoded><![CDATA[<p>It has been a while since I took <a href="http://bugs.gentoo.org/217141">Laurento Fritella contributions on bugzilla</a> for <strong>CoovaChilli</strong>-1.0.11 and made them available through <a href="http://overlays.gentoo.org/proj/sunrise">Sunrise overlay</a>. In the meantime I&#8217;ve tried to submit version 1.0.14 but run into some problems with SSL and I was back then completely out of time to fix it. Ebuild for <strong>version 1.0.11</strong> remains the only available.</p>
<p>Recently I decided to visit <a href="http://coova.org/wiki/index.php/CoovaChilli">CoovaChilli website</a> and check the latest version of the software. CoovaChilli is now at <strong>version 1.2.2</strong>. I&#8217;ve decided to dedicate some time to make this version available in Gentoo and started working on it. It&#8217;s also my intention to shorten the gap between new releases of CoovaChilli and their availability in the Overlay <img src='http://blog.noiselabs.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>OK, but.. what is CoovaChilli?</h3>
<p>Here goes a description taken from the website:</p>
<blockquote><p>CoovaChilli is an open-source software access controller, based on the popular (but now defunct) ChilliSpot project, and is actively maintained by an original ChilliSpot contributor. CoovaChilli is released under the GNU General Public License (GPL).  CoovaChilli is a feature rich software access controller that provides a captive portal / walled-garden environment and uses RADIUS or a HTTP protocol for access provisioning and accounting.  CoovaChilli is an integral part of the CoovaAP OpenWRT-based firmware which is specialized for hotspots.</p></blockquote>
<p>So CoovaChilli is a Wireless LAN Access Point Controller. For those who used Chillispot this is the natural successor.</p>
<h3>Follow the development process on GitHub</h3>
<p>I&#8217;m storing the Ebuild on <a href="http://github.com/noisebleed">my GitHub account</a> so for those wishing to check out the evolution of the Ebuild (<em>not sure why would someone want to do this but <img src='http://blog.noiselabs.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8230;</em>) just open <strong><a href="http://github.com/noisebleed/noisebleed-overlay/blob/master/net-wireless/coova-chilli/coova-chilli-1.2.2.ebuild">this link</a></strong>.</p>
<p>Of course is always possible to checkout the git repo and retrieve <a href="http://github.com/noisebleed/noisebleed-overlay">my personal Gentoo overlay</a> which includes the CoovaChilli ebuilds. To do this just execute:</p>
<pre>$ git clone git://github.com/noisebleed/noisebleed-overlay.git</pre>
<p>Make sure to keep the repo updated:</p>
<pre>$ git pull remote origin</pre>
<h3>Try version 1.0.11 available on Sunrise overlay</h3>
<p>The <strong>Sunrise overlay</strong> is the place I choose to provide the CoovaChilli ebuilds. To use the ebuild (coova-chilli-1.0.11) first bring the overlay into your system through <a href="http://layman.sourceforge.net/">Layman</a>:</p>
<pre>(Install layman)
# USE="subversion" emerge -va app-portage/layman
# layman -f -a sunrise
(since layman 1.2.3 use "/var/lib/" instead of "/usr/local/portage/")
# echo "source /var/lib/layman/make.conf" &gt;&gt; /etc/make.conf
(Update the overlay)
# layman -s sunrise</pre>
<p>Then just emerge the normal way:</p>
<pre># emerge -av net-wireless/coova-chilli</pre>
<p>More information about using overlays can be found on the <a href="http://www.gentoo.org/proj/en/overlays/userguide.xml">Gentoo documentation</a>. Specific Sunrise instructions are available on <a href="http://overlays.gentoo.org/proj/sunrise">Sunrise&#8217;s wiki</a>.</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/qXBb1_OmPuA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2010/ebuild-for-coovachilli-v1-2-2-coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2010/ebuild-for-coovachilli-v1-2-2-coming-soon/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ebuild-for-coovachilli-v1-2-2-coming-soon</feedburner:origLink></item>
		<item>
		<title>tar: file name is too long (max 99)</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/oYJ1VgC61jQ/</link>
		<comments>http://blog.noiselabs.org/2010/tar-file-name-is-too-long-max-99/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 00:16:46 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[automake]]></category>
		<category><![CDATA[autotools]]></category>
		<category><![CDATA[tar]]></category>

		<guid isPermaLink="false">http://noisebleed.blogetery.com/?p=184</guid>
		<description><![CDATA[I was doing the usual make dist process to launch a tarball for one of my apps when tar died with the following message: tar: file name is too long (max 99); not dumped tar: Error exit delayed from previous errors If you happen to see the same error message it is quite likely that&#8230;]]></description>
			<content:encoded><![CDATA[<p>I was doing the usual <strong>make dist</strong> process to launch a tarball for one of my apps when <strong>tar</strong> died with the following message:</p>
<pre>tar: file name is too long (max 99); not dumped
tar: Error exit delayed from previous errors</pre>
<p>If you happen to see the same error message it is quite likely that you (<em>and by you I mean </em><strong><em>Automake</em></strong>)Â are using the old V7 tar format.<br />
<br />
Just want the solution? It&#8217;s <a href="#howtofixit">here</a> <img src='http://blog.noiselabs.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>V7 and other tar formats</h3>
<p>By default <strong>Automake is pulling the historical V7 format</strong> to generate the tarball with make dist. This tar format supports file names only up to 99 characters and that&#8217;s why tar is refusing to build the tarball.</p>
<p>Since automake 1.9, th tar format can be chosen with the options tar-v7, tar-ustar, and     tar-pax.</p>
<p>This is what the <a href="http://www.gnu.org/software/hello/manual/automake/Options.html">Automake manual</a> says about each option:</p>
<ul>
<li><strong>tar-v7</strong></li>
</ul>
<blockquote><p>This is the historical default. This antiquated format is understood by all tar implementations and supports file names with up to 99 characters. When given longer file names some tar implementations will diagnose the problem while other will generate broken tarballs or use non-portable extensions. Furthermore, the V7 format cannot store empty directories.</p></blockquote>
<ul>
<li><strong>tar-ustar</strong></li>
</ul>
<blockquote><p>(&#8230;) format defined by POSIX 1003.1-1988. This format is believed to be old enough to be portable. It fully supports empty directories. It can store file names with up to 256 characters, provided that the file name can be split at directory separator in two parts, first of them being at most 155 bytes long. So, in most cases the maximum file name length will be shorter than 256 characters. However you may run against broken tar implementations that incorrectly handle file names longer than 99 characters.</p></blockquote>
<ul>
<li><strong>tar-pax</strong></li>
</ul>
<blockquote><p>(&#8230;) the new pax interchange format defined by POSIX 1003.1-2001. It does not limit the length of file names. However, this format is very young and should probably be restricted to packages that target only very modern platforms. There are moves to change the pax format in an upward-compatible way, so this option may refer to a more recent version in the future.</p></blockquote>
<h3><a name="howtofixit">How to fix it?</a></h3>
<p>The solution is to <strong>pick a newer and better tar implementation like tar-pax</strong>. Go to configure.ac or configure.in and change the AM_INIT_AUTOMAKE macro so it specifies the tar format and requires automake version to be 1.9 or better as tar-pax is only supported since 1.9.</p>
<p><strong><em>configure.ac/configure.in:</em></strong></p>
<pre lang="bash">AM_INIT_AUTOMAKE([1.9 tar-pax])</pre>
<p>Now run `make dist` again and tar won&#8217;t bother you anymore (at least with this error <img src='http://blog.noiselabs.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/oYJ1VgC61jQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2010/tar-file-name-is-too-long-max-99/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2010/tar-file-name-is-too-long-max-99/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=tar-file-name-is-too-long-max-99</feedburner:origLink></item>
		<item>
		<title>Chromium OS using Portage build environment</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/j2oClRoS8XU/</link>
		<comments>http://blog.noiselabs.org/2010/chromium-os-using-portage-build-environment/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 01:34:07 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[chromium os]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[portage]]></category>

		<guid isPermaLink="false">http://noisebleed.blogetery.com/?p=167</guid>
		<description><![CDATA[This are good news for the Gentoo community. Portage is being used to build Chromium OS packages. As you may know Portage is the Gentoo Linux default package management system which has its roots on FreeBSD&#8217;s ports. As of February 5, Google developer Ryan Cairns has made this statement on the Chromium OS dev mailing&#8230;]]></description>
			<content:encoded><![CDATA[<p>This are good news for the <strong>Gentoo</strong> community. <strong>Portage is being used to build Chromium OS</strong> packages. As you may know Portage is the Gentoo Linux default package management system which has its roots on FreeBSD&#8217;s <em>ports</em>.</p>
<p>As of February 5, Google developer <strong>Ryan Cairns</strong> has made <a href="http://groups.google.com/a/chromium.org/group/chromium-os-dev/browse_thread/thread/337cca9a0da59ad6/9354a38894da5df5">this statement</a> on the Chromium OS dev mailing list:</p>
<blockquote><p>As weâ€™ve been growing and working with more partners, theÂ need to support board specific builds and improveÂ our tools has become more urgent. In order to get there more quicklyÂ weâ€™ve been investigating several different build tools. We found thatÂ the Portage build tools suit our needs well and we will beÂ transitioning 100% within the next week.</p></blockquote>
<p>As a Gentoo user and supporter I&#8217;m happy to see Portage being picked by major projects like the Chromium OS. Hopefully it will bring more (positive) attention to Gentoo and maybe we will see the Google folks contributing with improvements and bug fixes back to Portage.</p>
<p>For those interested in checking out the Portage-based build environment and <strong>build a bootable Chromium OS image</strong> take a look at <a href="http://dev.chromium.org/chromium-os/building-chromium-os/portage-based-build">this Chromium OS documentation page</a>.</p>
<p>If you are interested in <strong>Portage features and usage</strong> check the <a href="http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=1">Gentoo Handbook page about Portage</a>. And if you got curious about <strong>Portage history</strong> I recommend the <a href="http://www.gentoo.org/doc/en/articles/making-the-distro-p3.xml">thisÂ article</a> by <strong>Daniel Robbins</strong>, the founder of Gentoo.</p>
<p>To know more about the Chromium OS project and Google Chrome OS check <a href="http://www.chromium.org/chromium-os">this</a>.</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/j2oClRoS8XU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2010/chromium-os-using-portage-build-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2010/chromium-os-using-portage-build-environment/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=chromium-os-using-portage-build-environment</feedburner:origLink></item>
		<item>
		<title>Mark all messages as Read in Gmail (in 3 easy steps)</title>
		<link>http://feedproxy.google.com/~r/noiselabs/~3/QI6MJKhjFyU/</link>
		<comments>http://blog.noiselabs.org/2010/mark-all-messages-as-read-in-gmail/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 16:42:09 +0000</pubDate>
		<dc:creator>noisebleed</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://noisebleed.blogetery.com/?p=153</guid>
		<description><![CDATA[Want to get rid of all those unread messages in Gmail? Or, just like me, have some unread messages you can&#8217;t find and want to reset the unread count to zero? Well, here is the solution: Step 1: Type &#8220;is:unread&#8221; in the search bar. Step 2: Then select &#8220;Unread&#8221; as seen in the picture below.&#8230;]]></description>
			<content:encoded><![CDATA[<p>Want to get rid of all those unread messages in Gmail? Or, just like me, have some unread messages you can&#8217;t find and want to reset the unread count to zero? Well, here is the solution:</p>
<ul>
<li><em><strong>Step 1:</strong></em> Type &#8220;<strong>is:unread</strong>&#8221; in the search bar.</li>
</ul>
<ul>
<li><em><strong>Step 2</strong>:</em> Then select &#8220;<strong>Unread</strong>&#8221; as seen in the picture below.</li>
</ul>
<div id="attachment_155" class="wp-caption alignleft" style="width: 730px"><img class="size-full wp-image-155 " title="mark-all-messages-read-gmail_1" src="http://noisebleed.blogetery.com/files/2010/02/mark-all-messages-read-gmail_1.jpg" alt="Type &quot;is:unread in the search bar and then select &quot;Unread&quot; from the selection bar" width="720" height="237" /><p class="wp-caption-text">Type &quot;is:unread&quot; in the search bar and then select &quot;Unread&quot; from the selection bar</p></div>
<li><em><strong>Step 3:</strong></em> In the &#8220;More actions&#8221; dropdown select &#8220;<strong>Mark as read</strong>&#8220;</li>
<div id="attachment_158" class="wp-caption alignleft" style="width: 730px"><img class="size-full wp-image-158 " title="mark-all-messages-read-gmail_2" src="http://noisebleed.blogetery.com/files/2010/02/mark-all-messages-read-gmail_2.jpg" alt="mark-all-messages-read-gmail_2" width="720" height="237" /><p class="wp-caption-text">In the &quot;More actions&quot; dropdown select &quot;Mark as read&quot;</p></div>
<p>And that&#8217;s it. Your inbox shouldn&#8217;t be reporting any unread messages by now.</p>
<img src="http://feeds.feedburner.com/~r/noiselabs/~4/QI6MJKhjFyU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.noiselabs.org/2010/mark-all-messages-as-read-in-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.noiselabs.org/2010/mark-all-messages-as-read-in-gmail/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mark-all-messages-as-read-in-gmail</feedburner:origLink></item>
	</channel>
</rss>

