<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
        <id>urn:www-kavalablogs-gr:feeds:atom</id>
	<title>Kavala Blogs &#187; The light of the LAMP</title>
	<subtitle>Kavala Blogs &#187; The light of the LAMP</subtitle>      
        <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/" />
        <link rel="self" type="text/xml" href="http://www.kavalablogs.gr/?media=atom"/>
        <updated>2010-09-07T16:10:38-04:00</updated>
	<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/06/27/PHP:_print_a_calendar_fast</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: PHP: print a calendar fast</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/06/27/PHP:_print_a_calendar_fast"/>		
		<updated>2010-06-28T01:23:00-04:00</updated>
		<published>2010-06-28T01:23:00-04:00</published>
		<content type="html"><![CDATA[	<a href="http://www.amazon.com/PHP-Cookbook-Solutions-Examples-Programmers/dp/0596101015?ie=UTF8&amp;tag=a0fba-21&amp;link_code=bil&amp;camp=213689&amp;creative=392969"><img src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=0596101015&amp;tag=a0fba-21" /></a>Say you need to fill a file or a sheet of paper (if you print the output) with a range of consecutive dates (or dates with equal space between them). Then, the following PHP one-liner might be handy some day:<br />
<blockquote>for ($i=1; $i&lt;=365; $i++) echo date( "Y-m-d", mktime( 0, 0, 0, 1, $i)). "\n";</blockquote><img src="http://www.assoc-amazon.com/e/ir?t=a0fba-21&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=0596101015" /><br />
The above snippet prints each day of current year on its own line. If you want one day per week, then you can change accordingly the values of for-loop variable, for example:<br />
<blockquote>for ($i=4; $i&lt;=365; $i+=7) [...]</blockquote>&nbsp;Or, for next year's calendar:<br />
<blockquote>for ($i=1; $i&lt;=365; $i++) echo date( "Y-m-d", mktime( 0, 0, 0, 1, $i, 1+date("Y"))). "\n";</blockquote>Don't forget to change 365 with 366 for a leap year. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-2622977048329085256?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/Ij-9HJvlp3bxMqmCr3Mrx50Z2Ro/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ij-9HJvlp3bxMqmCr3Mrx50Z2Ro/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/Ij-9HJvlp3bxMqmCr3Mrx50Z2Ro/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ij-9HJvlp3bxMqmCr3Mrx50Z2Ro/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=RZ1W-UMMY0s:7ti-tuGmf4Q:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=RZ1W-UMMY0s:7ti-tuGmf4Q:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=RZ1W-UMMY0s:7ti-tuGmf4Q:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=RZ1W-UMMY0s:7ti-tuGmf4Q:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=RZ1W-UMMY0s:7ti-tuGmf4Q:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/RZ1W-UMMY0s" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/05/22/Google_secure_search_with_Firefox</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: Google secure search with Firefox</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/05/22/Google_secure_search_with_Firefox"/>		
		<updated>2010-05-22T15:19:00-04:00</updated>
		<published>2010-05-22T15:19:00-04:00</published>
		<content type="html"><![CDATA[	Google has announced recently the option to <a href="http://googleblog.blogspot.com/2010/05/search-more-securely-with-encrypted.html">search the web via an encrypted, secure channel</a>. For Firefox, this can be accomplished by making some changes, like the following:<br />
<ul><li>in a new tab, open "<a href="config">about:config</a>" and search for "<a href="http://www.google/">http://www.google</a>" (search box is located at the top of the tab area). You 'll find "keyword.URL" setting and you can change its value by double-clicking on it. Just add "s" after "http".<br />
<br />
<br />
<a href="http://1.bp.blogspot.com/_K5QpSGJ6e4c/S_eaQIofkDI/AAAAAAAABF8/l4tkeuXpaYg/s1600/google-ssl-firefox-1.png"><img src="http://1.bp.blogspot.com/_K5QpSGJ6e4c/S_eaQIofkDI/AAAAAAAABF8/l4tkeuXpaYg/s400/google-ssl-firefox-1.png" /></a></li>
<li>open bookmarks by pressing Ctrl+Shift+B and search for "<a href="http://google.com/search?">google.com/search?</a> q=" (search box is located at the upper right corner of the window). At first, you can eliminate all duplicates (as I did), then change all "http" occurrences to "https"<br />
<br />
<br />
<a href="http://1.bp.blogspot.com/_K5QpSGJ6e4c/S_eauEHuilI/AAAAAAAABGA/xtwMvGCpC8Q/s1600/google-ssl-firefox-2.png"><img src="http://1.bp.blogspot.com/_K5QpSGJ6e4c/S_eauEHuilI/AAAAAAAABGA/xtwMvGCpC8Q/s400/google-ssl-firefox-2.png" /></a></li>
</ul><br />
For Google Toolbar users, I believe there will be an update very soon. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-2954277355876482830?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/i7dOSCFPj0EaYm5SwX5WypcpGKQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/i7dOSCFPj0EaYm5SwX5WypcpGKQ/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/i7dOSCFPj0EaYm5SwX5WypcpGKQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/i7dOSCFPj0EaYm5SwX5WypcpGKQ/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0W96ktOFMtE:GSlK7KCSndw:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0W96ktOFMtE:GSlK7KCSndw:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0W96ktOFMtE:GSlK7KCSndw:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0W96ktOFMtE:GSlK7KCSndw:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0W96ktOFMtE:GSlK7KCSndw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/0W96ktOFMtE" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/05/21/How_many_jquery.js_files_do_YOU_have_in_your_disk_</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: How many jquery.js files do YOU have in your disk?</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/05/21/How_many_jquery.js_files_do_YOU_have_in_your_disk_"/>		
		<updated>2010-05-21T09:07:00-04:00</updated>
		<published>2010-05-21T09:07:00-04:00</published>
		<content type="html"><![CDATA[	It seems that <a href="http://jquery.com/">jquery</a> is the most popular javascript framework among web developers out there. This is not a bad thing, of course. The bad thing, or should I've said "practice", is that almost all developers [need to] use their 'own' version of the library and they include it into their plugin/theme/application directories!<br />
<br />
Don't get me wrong; I'm not (currently) using it to code anything, but yesterday I thought it could be a good start to find the library and check its contents in order to start learning &amp; using it. To my surprise, when I checked into my hard disk, I found <b>50 jquery.js</b> files (not to mention the <b>364 jquery.*\.js</b> ones)! It looks like a waste of space and a source of possible incompatibilities to me, don't you think so?<br />
<br />
Just try this command in a terminal:<br />
<blockquote>locate -i jquery | grep "jquery.js"&nbsp; | wc -l </blockquote>or the 'full' version: <br />
<blockquote>locate -i jquery | egrep "jquery.*\.js"&nbsp; | wc -l </blockquote>and see how many files it 'll report for your hard disk. If there are more than 10 (as in my case), I'd be worried.<br />
<br />
I believe that all of that mess could be avoided if the developers used the <a href="http://code.google.com/apis/ajaxlibs/">Google-hosted versions of the library</a> and avoided its inclusion into their directories.<br />
<br />
On the other hand, if you are a developer and want to test your source files with a local version of the library, while providing the Google-API one to your visitors, you can use the <a href="http://lightoflamp.blogspot.com/2007/03/php-function-isme.html">is_me()</a> [PHP function] to incorporate the appropriate jquery files. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-7211322184239970713?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/qbqo4gRa8LInXLwH7e2R0aJRzd4/0/da"><img src="http://feedads.g.doubleclick.net/~a/qbqo4gRa8LInXLwH7e2R0aJRzd4/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/qbqo4gRa8LInXLwH7e2R0aJRzd4/1/da"><img src="http://feedads.g.doubleclick.net/~a/qbqo4gRa8LInXLwH7e2R0aJRzd4/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0fo48fAzHDg:iQSinGzX83Q:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0fo48fAzHDg:iQSinGzX83Q:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0fo48fAzHDg:iQSinGzX83Q:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=0fo48fAzHDg:iQSinGzX83Q:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=0fo48fAzHDg:iQSinGzX83Q:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/0fo48fAzHDg" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/05/17/Google_Wave_as_a_chat_web_application</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: Google Wave as a chat web application</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/05/17/Google_Wave_as_a_chat_web_application"/>		
		<updated>2010-05-17T22:22:00-04:00</updated>
		<published>2010-05-17T22:22:00-04:00</published>
		<content type="html"><![CDATA[	<a href="http://www.amazon.com/Complete-Guide-Google-Wave/dp/0982592604?ie=UTF8&amp;tag=a0fba-21&amp;link_code=bil&amp;camp=213689&amp;creative=392969"><img src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=0982592604&amp;tag=a0fba-21" /></a>I admit that I'm not using <a href="http://wave.google.com/">Google Wave</a> as much as I can and the main reason for this is the lack of coworkers/colleagues/friends who are actively using it. <img src="http://www.assoc-amazon.com/e/ir?t=a0fba-21&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=0982592604" />The tool must have a purpose, right?<br />
<br />
So, yesterday, I've come with an idea to create a purpose for me and the members of one of my sites. Since Google allows me to <a href="http://www.google.com/webelements/wave/">make a wave public and embed it in a web page</a>, I can't see no reason not to create a public wave and use it as a <b>web application for chat</b>!<br />
<br />
The benefits for this decision are more than the disadvantages. Actually, I can see only two of the latter: the small number of people who are using it and the fact that it is still in beta version and one can become a member only by invitation by another member [19 May 2010 update: Google announced today that <a href="http://googlewavedev.blogspot.com/2010/05/google-wave-platform-updates-at-io-see.html">access to Google Wave is free</a> to everyone, given that she has a Google account]. On the other hand, the usage of a public wave as a chat application has the following advantages (at least, for me):<br />
<ul><li><b>Easy setup</b>: Just copy-paste the code from the <a href="http://www.google.com/webelements/wave/">Google Web Elements</a> page and start using it. Also, there is no need for local storage or a dedicated database.</li>
<li><b>Instant notifications</b>: The members can see the replies of the other members, as they are writing them or even replay the discussion step by step. There are also email notifications for new replies, so (a) there is no need to continuously check the web page and (b) you can react immediately if you detect any abuse.</li>
<li><b>Indented replies</b>: The members can choose to reply to a discussion or start their own.</li>
<li><b>Identified members</b>: There are no anonymous replies (possible spam), albeit the public nature of the wave.</li>
</ul>There may be more, we 're still evaluating this solution and maybe there is something I didn't reckon when I decided to follow this route. I know that there are other alternatives, but you can't beat the simpleness of this one. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-661829688309986487?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/DSnmc1xmH_4CeiLCJa7Z0Z8__3c/0/da"><img src="http://feedads.g.doubleclick.net/~a/DSnmc1xmH_4CeiLCJa7Z0Z8__3c/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/DSnmc1xmH_4CeiLCJa7Z0Z8__3c/1/da"><img src="http://feedads.g.doubleclick.net/~a/DSnmc1xmH_4CeiLCJa7Z0Z8__3c/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lj7LtHOOcZI:o7J0NoTkByE:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lj7LtHOOcZI:o7J0NoTkByE:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lj7LtHOOcZI:o7J0NoTkByE:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lj7LtHOOcZI:o7J0NoTkByE:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lj7LtHOOcZI:o7J0NoTkByE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/lj7LtHOOcZI" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/01/31/System_upgrade_to_Ubuntu_9.10</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: System upgrade to Ubuntu 9.10</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2010/01/31/System_upgrade_to_Ubuntu_9.10"/>		
		<updated>2010-01-31T15:10:00-05:00</updated>
		<published>2010-01-31T15:10:00-05:00</published>
		<content type="html"><![CDATA[	<br />
I know that I'm some months late on upgrading, but for a production system I prefer to let things cool down a little before attempting the system upgrade. However, even with this methodology, there may be still some problems after finishing, and I have found two of them today, after upgrading to <i>karmic koala</i> version of <i>Ubuntu</i> (9.10 for number-centric fans).<br />
<br />
The first one was a problem with <i>mysql-client</i>, which remained in 5.0 version for some reason. I was able to resolve this issue by manually installing version 5.1:<br />
<blockquote>aptitude install mysql-client-5.1</blockquote><br />
The second problem had to do with updating <i>vnstat</i>'s database ('vnstat -u'). After testing various ideas, I came up with no other solution than deleting the previous databases and recreating new ones with the following commands:<br />
<blockquote>rm /var/lib/vnstat/eth* /var/lib/vnstat/.eth*<br />
vnstat -u -i eth0<br />
vnstat -u -i eth1</blockquote><br />
I hope that there will be no other surprises (until the next upgrade of course) Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-1008696999845416007?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/VeP3-n4KdEyF7BgocHJGLgIqvKw/0/da"><img src="http://feedads.g.doubleclick.net/~a/VeP3-n4KdEyF7BgocHJGLgIqvKw/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/VeP3-n4KdEyF7BgocHJGLgIqvKw/1/da"><img src="http://feedads.g.doubleclick.net/~a/VeP3-n4KdEyF7BgocHJGLgIqvKw/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=X1UTa7yX7uE:OJqRHRgZtqg:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=X1UTa7yX7uE:OJqRHRgZtqg:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=X1UTa7yX7uE:OJqRHRgZtqg:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=X1UTa7yX7uE:OJqRHRgZtqg:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=X1UTa7yX7uE:OJqRHRgZtqg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/X1UTa7yX7uE" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/09/01/send_mail_to_correct_local_host</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: send mail to correct local host</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/09/01/send_mail_to_correct_local_host"/>		
		<updated>2009-09-02T03:24:00-04:00</updated>
		<published>2009-09-02T03:24:00-04:00</published>
		<content type="html"><![CDATA[	After upgrading my previous server with a new one, I run a lot of migration scripts and update procedures to make sure that everything transferred OK and worked as expected. However, a little thing kept bugging me until today.<br />
<br />
Usually, when you want to send an email message to a local user, you either send it to <i>user@localhost</i> or just to <i>user</i> and the mail service makes sure that the local hostname is added after the '@' (if there is nothing there of course).  But the problem for me was that messages to local users relayed through my external mailgate after the upgrade.<br />
<br />
The <i>/etc/hosts</i> and the configuration files of <i>postfix</i> were already filled with the correct hostnames and I could not find anything until I tried to search all the files in /etc hierarchy for the old hostname.<br />
<br />
To my surprise, I found that the old hostname was still in <b><i>/etc/mailname</i></b> which, according to its man page, is a plain ASCII configuration file, which on a Debian system contains the visible mail name of the system.<br />
<br />
I don't know if the upgrade kept it intact or it was the restoration of /etc data files that caused this discrepancy. The good thing is that I found it easily by searching with grep. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-1990675286009979254?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/pDugJlJXp547u2WKEaeqUgBTWeQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/pDugJlJXp547u2WKEaeqUgBTWeQ/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/pDugJlJXp547u2WKEaeqUgBTWeQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/pDugJlJXp547u2WKEaeqUgBTWeQ/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=F7EyVNsgzak:wlkOfyvuUPI:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=F7EyVNsgzak:wlkOfyvuUPI:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=F7EyVNsgzak:wlkOfyvuUPI:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=F7EyVNsgzak:wlkOfyvuUPI:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=F7EyVNsgzak:wlkOfyvuUPI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/F7EyVNsgzak" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/08/31/Change_photo_extensions_by_content</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Change photo extensions by content</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/08/31/Change_photo_extensions_by_content"/>		
		<updated>2009-08-31T14:26:00-04:00</updated>
		<published>2009-08-31T14:26:00-04:00</published>
		<content type="html"><![CDATA[	Recently I had an interesting problem.&nbsp; I had a lot of files in a directory, all photos, with their filenames messed up, especially their extensions.&nbsp; So, in order to clear them and keep only the good ones, I had first to rename them in a more consistent manner (the JPEG photos ending with .jpeg, the PNGs with .png and so on).<br />
<br />
I guess there is probably a plethora of appropriate tools, but I had no time to search in the chaotic internet, so I wrote a small PHP script (with a little help from the shell: command '<i>file</i>') and run it from the command line.<br />
<br />
The script just parses the output of the <i>file</i> command and renames each file accordingly.<br />
<br />
I'm putting this here, just in case it will be useful to someone else also:<br />
<br />
<code><pre>#!/usr/bin/php
&lt;?php

$res = array();
exec( "file *", $res);

foreach( $res as $f) {
 list( $fn, $ft) = split( ':', $f);
 if (strpos( $ft, "JPEG") !== false) {
  rename( $fn, $fn .".jpeg");
 } else if (strpos( $ft, "PNG") !== false) {
  rename( $fn, $fn .".png");
 } else
  echo "cannot rename $fn\n";
}
?&gt;
</pre></code><br />
<br />
I'm actually testing only for JPEG &amp; PNG files since I know that I have only these two types.<br />
Don't forget to make this file executable if you want to run it from the command line. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-5716227148209382532?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/xipT_UtVAUHO2kXwDjhNYoB9EAc/0/da"><img src="http://feedads.g.doubleclick.net/~a/xipT_UtVAUHO2kXwDjhNYoB9EAc/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/xipT_UtVAUHO2kXwDjhNYoB9EAc/1/da"><img src="http://feedads.g.doubleclick.net/~a/xipT_UtVAUHO2kXwDjhNYoB9EAc/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lzYHlPlZkco:MOq_E7JRuK4:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lzYHlPlZkco:MOq_E7JRuK4:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lzYHlPlZkco:MOq_E7JRuK4:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=lzYHlPlZkco:MOq_E7JRuK4:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=lzYHlPlZkco:MOq_E7JRuK4:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/lzYHlPlZkco" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/05/20/Focus-stealing_applications</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: Focus-stealing applications</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/05/20/Focus-stealing_applications"/>		
		<updated>2009-05-20T23:03:00-04:00</updated>
		<published>2009-05-20T23:03:00-04:00</published>
		<content type="html"><![CDATA[	I don't like focus-stealing applications (and I bet that I'm not the only one)! They are like kids who are struggling for your attention while you 're working with something else, constantly interrupting your thoughts and work flow.<br />
<br />
Is it so difficult for the developers to take this thing into consideration?<br />
Come on people, don't you get annoyed when you are developing _and_ testing these applications?<br />
<br />
An example:<br />
I started using FriendFeed's desktop application, which notifies me when something occurs in my friends streams. It's a well designed application, taking very little area in my desktop, except when there are new bubble-notifications. Then, whatever I'm doing I have to stop, because little bubbles start popping up while, at the same time, becoming the top-level window (thus stealing my keystrokes)! Usually, if I'm in the middle of something important I end up unloading this little ghost!<br />
<br />
I strongly believe that tray-located applications must be as transparent as they can be. They are there to work silently and (probably) notify the user, but without interrupting the work she's doing, otherwise they are not useful but distracting. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-7630329641704916093?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/mihLhU18flBeAKkfPI_XI4mHXU0/0/da"><img src="http://feedads.g.doubleclick.net/~a/mihLhU18flBeAKkfPI_XI4mHXU0/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/mihLhU18flBeAKkfPI_XI4mHXU0/1/da"><img src="http://feedads.g.doubleclick.net/~a/mihLhU18flBeAKkfPI_XI4mHXU0/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=PhS3UPGUwyY:gEcnaUz4odw:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=PhS3UPGUwyY:gEcnaUz4odw:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=PhS3UPGUwyY:gEcnaUz4odw:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=PhS3UPGUwyY:gEcnaUz4odw:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=PhS3UPGUwyY:gEcnaUz4odw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/PhS3UPGUwyY" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/03/28/3D:_Desktop_Describing_Day</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: 3D: Desktop Describing Day</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/03/28/3D:_Desktop_Describing_Day"/>		
		<updated>2009-03-29T02:11:00-04:00</updated>
		<published>2009-03-29T02:11:00-04:00</published>
		<content type="html"><![CDATA[	Our desktops are (like) our offices, right?<br />
Well, not for me friends!<br />
<br />
Although my 3D (i.e. real life) office is rather messy (at least for other people, not for me of course), my computer desktop is rather simple.<br />
<br />
I work usually with my laptop, as most people do these days, and, since I'm rather a CLI person, I like it 'naked'. I'm using <a href="http://www.xfce.org/">XFCE</a> as my window manager with 2 virtual desktops (featuring a dark, mostly black, photo from my favorite tv-show as a background picture and only 4 icons which I rarely open) and its tray sitting on the lower right corner with a bottom-up direction.<br />
<br />
This tray contains (bottom -&gt; up): battery readings, time/date, <a href="https://launchpad.net/gwibber">gwibber</a>, <a href="http://www.rsibreak.org/">RSIBreak</a>, the sound applet and the open applications bar.<br />
<br />
I have only two windows open all the time: xfce4-terminal (with at least 3 open tabs) and <a href="http://www.mozilla.com/firefox/">Firefox</a> (with 2+ open tabs). Of course, when needed, I may open <a href="http://www.openoffice.org/">OpenOffice.org</a> or some other windows, but usually I work with just these two.<br />
<br />
Don't worry about underusing my laptop; it's actually a full LAMP server, working 24/7 and serving 4 web sites (for now). <br />
<br />
You may find this arrangement rather minimalistic, but I find it very work-oriented and I prefer it from a more complicated one.<br />
<br />
So, what is your desktop like? Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-7058804976445294611?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/IlucEZnu0YIPMVeyzdOSRmcLa_Y/0/da"><img src="http://feedads.g.doubleclick.net/~a/IlucEZnu0YIPMVeyzdOSRmcLa_Y/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/IlucEZnu0YIPMVeyzdOSRmcLa_Y/1/da"><img src="http://feedads.g.doubleclick.net/~a/IlucEZnu0YIPMVeyzdOSRmcLa_Y/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:VYtfdMxc7SE"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=3ro_V1WQCzw:G7tmPM3MHcI:VYtfdMxc7SE"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=yIl2AUoC8zA"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:63t7Ie-LG7Y"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=63t7Ie-LG7Y"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=3ro_V1WQCzw:G7tmPM3MHcI:F7zBnMyn0Lo"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=3ro_V1WQCzw:G7tmPM3MHcI:V_sGLiPBpWU"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=qj6IDK7rITs"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?i=3ro_V1WQCzw:G7tmPM3MHcI:gIN9vFwOqvQ"></img></a> <a href="http://feeds.feedburner.com/~ff/LightOfLamp?a=3ro_V1WQCzw:G7tmPM3MHcI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/LightOfLamp?d=TzevzKxY174"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/3ro_V1WQCzw" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/01/03/I_don_t_like_you_any_more,_ScribeFire!</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: I don't like you any more, ScribeFire!</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2009/01/03/I_don_t_like_you_any_more,_ScribeFire!"/>		
		<updated>2009-01-03T11:29:00-05:00</updated>
		<published>2009-01-03T11:29:00-05:00</published>
		<content type="html"><![CDATA[	Today I uninstalled the <a href="http://www.scribefire.com/">ScribeFire</a> <a href="https://addons.mozilla.org/en-US/firefox/addon/1730">addon</a> for Firefox because I was not happy by its performance.<br />
<br />
Don't get me wrong... I 've used it as an offline blog post editor for more than a year and, I have to say that, it has some very useful features and I recommend it to anyone, who needs this functionality, to try it since it's in constant development with new versions appearing almost any month.<br />
<br />
But, since it was not as WYSIWYG as I thought (at least when cooperating with <a href="http://blogger.com/">Blogger</a>), I decided to not use it anymore. Maybe it's Blogger, maybe it's ScribeFire, I can't say for sure... the fact is that my latest post (on another blog) didn't appeared the same way when I published it to Blogger, so I had to open it again with Blogger's editor to correct it.<br />
<br />
I 'd like to use such an offline editor, so I can post from the convenience of my browser, keep my notes and references for later use, be able to post to and interact with more than one blogs. In the past, I 've used many alternative solutions and I thought my search was over with ScribeFire. But, if I have to check that everything is OK <b>every</b> time (and most times to edit again the posts), then I'm not content. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-5165980967701194007?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/-gZqy3pTH53zxIvbNf4fAMziXBs/0/da"><img src="http://feedads.g.doubleclick.net/~a/-gZqy3pTH53zxIvbNf4fAMziXBs/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/-gZqy3pTH53zxIvbNf4fAMziXBs/1/da"><img src="http://feedads.g.doubleclick.net/~a/-gZqy3pTH53zxIvbNf4fAMziXBs/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=2uStBhsL"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=2uStBhsL"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ofzChPwn"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=oON4PhdX"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=MHLMKlsS"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=MHLMKlsS"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=esXdcFJw"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=esXdcFJw"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=weiN5K1o"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=6N9O5GaN"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=6N9O5GaN"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=YzsebVAE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/3DzawEh-x9k" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/10/23/Sample_data_and_how_to_produce_them</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Sample data and how to produce them</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/10/23/Sample_data_and_how_to_produce_them"/>		
		<updated>2008-10-23T09:43:00-04:00</updated>
		<published>2008-10-23T09:43:00-04:00</published>
		<content type="html"><![CDATA[	Sometimes a programmer needs to <b>test/debug</b> one application by feeding it with data, random or not. In a situation like this, there are some utilities one can use to produce as many data as she needs.<br />
<br />
Let's start with a simple example of feeding our test application (we will call it "test_data") with zeroes, say 100 bytes with a value of zero.<br />
<br />
<blockquote>head --bytes=100 /dev/zero | ./test_data</blockquote><br />
The above command has two parts; the first one (before the '|' delimiter), '<i>head</i>', reads <i>/dev/zero</i> device, which provides us with zero-valued bytes as a stream, up to a count of 100 bytes and sends them to the second one, '<i>test_data</i>', as input. If we wanted more, say 100 KBytes, we would replace the parameter of 'bytes' argument with "100k", as follows:<br />
<br />
<blockquote>head --bytes=100k /dev/zero | ./test_data</blockquote><br />
Now, let's say we want random data. It's as simple as replacing '/dev/zero' device with '<i>/dev/random</i>':<br />
<br />
<blockquote>head --bytes=100k /dev/random | ./test_data</blockquote><br />
With the above command combination, we produce 100 KBytes of random data as input to our test_data application.<br />
<br />
And what if we wanted some specific data, like "testing with sample data", repeated 40 times?<br />
<br />
<blockquote>yes "testing with sample data" | head -40 | ./test_data</blockquote><br />
The '<i>yes</i>' command just outputs its input continuously; 'head' keeps only the first 40 lines; 'test_data' works with these 40 lines of the sample string.<br />
<br />
<br />
Programming life can be very simple (and entertaining) some times! Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-8673612451950843967?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/W6defdtuQqNCnhZ8gjoW0It_aFw/0/da"><img src="http://feedads.g.doubleclick.net/~a/W6defdtuQqNCnhZ8gjoW0It_aFw/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/W6defdtuQqNCnhZ8gjoW0It_aFw/1/da"><img src="http://feedads.g.doubleclick.net/~a/W6defdtuQqNCnhZ8gjoW0It_aFw/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=0DHwOofI"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=0DHwOofI"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=dD77eTys"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Vsnuc4Y3"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=gWt1MK19"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=gWt1MK19"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=nG9fQLjH"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=nG9fQLjH"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=wl8i3Z6t"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=PUWsEQc1"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=PUWsEQc1"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=5gjXh8ep"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/8kbyrKI8Qvs" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/10/06/Use_the_source,_Luke..._even_for_HTML_pages!</id>
		<author><name>Monotropos</name></author>
		<title>The light of the LAMP: Use the source, Luke... even for HTML pages!</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/10/06/Use_the_source,_Luke..._even_for_HTML_pages!"/>		
		<updated>2008-10-07T00:17:00-04:00</updated>
		<published>2008-10-07T00:17:00-04:00</published>
		<content type="html"><![CDATA[	These days I'm experimenting with a few desktop clients to read/update status messages from/to some socail networks I participate and I want to be involved more from now on. But there is a small catch!<br />
<br />
Most desktop clients nowadays are being built using Adobe's <a href="http://www.adobe.com/products/air/">AIR</a>. So, at first, I downloaded and installed the AIR package for Linux and all went well.<br />
<br />
After that, I had to visit each client's homepage to install the client. In order to make things easier for the end user to complete the installation, there is an automated procedure through the webpage. The only problem is that this procedure fails to accept the fact that I have already installed AIR and doesn't let me proceed with the download/installation.<br />
<br />
So, what can a poor developer/user do in such a situation?<br />
Simple... "<b>use the source, Luke!</b>" and look at the HTML code of the webpage and try to find the link reference to the ".air" file, then download it manually and continue the installation from the command line using AIR's "Adobe AIR Application Installer" (located at /usr/bin directory).<br />
<br />
From Firefox, while viewing the desktop client's webpage, press Ctrl+U to view the source, search for ".air" (without the quotes) and copy to clipboard the URL in the 'a href=' clause. Paste the copied URL into the location bar and save the file to your hard disk. Then run<br />
<blockquote>Adobe AIR Application Installer</blockquote>and guide it to the just-downloaded file to start the installation.<br />
<br />
As usual, "the devil is in the details", right?&nbsp; :-) Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-3216887943183861640?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/Jdz5YCQ4v4wRGqlchCItHYYNTvE/0/da"><img src="http://feedads.g.doubleclick.net/~a/Jdz5YCQ4v4wRGqlchCItHYYNTvE/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/Jdz5YCQ4v4wRGqlchCItHYYNTvE/1/da"><img src="http://feedads.g.doubleclick.net/~a/Jdz5YCQ4v4wRGqlchCItHYYNTvE/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=BonffxoF"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=BonffxoF"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=BaxgacNS"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=WM2fOSsY"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=FPoMyLvb"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=FPoMyLvb"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=9CCPJGrv"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=9CCPJGrv"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=AJJyeliJ"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ktmKeYrK"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=ktmKeYrK"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=DshTKKhJ"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/8oy1MsZ4Tm8" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/06/18/Firefox_3_download_day</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Firefox 3 download day</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/06/18/Firefox_3_download_day"/>		
		<updated>2008-06-18T12:22:00-04:00</updated>
		<published>2008-06-18T12:22:00-04:00</published>
		<content type="html"><![CDATA[	Today is the day Firefox 3 has launched and the day it tries to break a world record of the most downloads and installations of a software package in a day.<br /><br />So, if you like Firefox, why don't you help?<br /><br /><a href='http://www.spreadfirefox.com/node&amp;id=0&amp;t=264'><img src='http://www.spreadfirefox.com/files/images/affiliates_banners/dday_badge_fox.png' /></a> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-3310342854516011246?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/3-DQVlCNJ-Ar6ZcPvXyiuO76so8/0/da"><img src="http://feedads.g.doubleclick.net/~a/3-DQVlCNJ-Ar6ZcPvXyiuO76so8/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/3-DQVlCNJ-Ar6ZcPvXyiuO76so8/1/da"><img src="http://feedads.g.doubleclick.net/~a/3-DQVlCNJ-Ar6ZcPvXyiuO76so8/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=uZrwmnhN"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=uZrwmnhN"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=IRQ8OZCL"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=gjzvKjW4"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=kx6eUIPF"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=kx6eUIPF"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Rb8G9pQu"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Rb8G9pQu"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=GpxxAxzu"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=NYdpTooM"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=NYdpTooM"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ZYRxc9I2"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/s_Ej3FAEYv0" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/06/13/Backup_files_before_editing</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Backup files before editing</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/06/13/Backup_files_before_editing"/>		
		<updated>2008-06-13T09:02:00-04:00</updated>
		<published>2008-06-13T09:02:00-04:00</published>
		<content type="html"><![CDATA[	It's a fact that many text editors (or word processors) have the ability to keep a backup copy of every file you edit, just to assure you that you can always restore the previous version of the file. This is usually implemented by creating a copy of the file with a file extension of .bak or by appending a "~" character at the end of the current file extension, like .c~<br /><br />Although being a useful option for a programmer (or a writer), it lacks the capability of keeping more backup copies, like a <a href='http://en.wikipedia.org/wiki/Concurrent_Versions_System'>CVS</a> (Concurrent Versions System) where the author can go back in time and find the text file as is was e.g. a month ago (very handy if you want to restore something you have deleted just before one week).<br /><br />In order to avoid the complexity of a CVS, yet having the option to "travel" back in time, I wrote a small shell script, which I'm running just before my editing sessions. The script looks like this:<br /><blockquote>#!/bin/bash<br />datetime=`date +%Y%m%d_%H%M`<br />bdir=".backup"<br /><br />mkdir $bdir  2&gt; /dev/null<br /><br />for a in $*; do<br />        cp -av $a $bdir/$datetime.$a<br />done<br />gzip -9 $bdir/$datetime.*<br /></blockquote>All it does is to keep a compressed copy of every file you want to edit in a directory named ".backup", hence I named it "backup2.backup" and I run it as:<br /><blockquote>backup2.backup *.php *.html<br /></blockquote>It doesn't check many things, but I'm using it for some time now. Feel free to enhance it as you like it.<br /><br /> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-2929308991040782618?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/keH6qJ9WRuv7mtVHP_woNsdQFIY/0/da"><img src="http://feedads.g.doubleclick.net/~a/keH6qJ9WRuv7mtVHP_woNsdQFIY/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/keH6qJ9WRuv7mtVHP_woNsdQFIY/1/da"><img src="http://feedads.g.doubleclick.net/~a/keH6qJ9WRuv7mtVHP_woNsdQFIY/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=4Prmdwd3"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=4Prmdwd3"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=NeEei8XO"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=jotyc8sB"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=D2Sozjrf"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=D2Sozjrf"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=jUhsclkx"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=jUhsclkx"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=gXUx68Cz"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=EefLpDF8"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=EefLpDF8"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=nSRKhvQ5"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/Wt9cH4yxS_w" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/04/23/Formatting_human_readable_numbers_with_PHP</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Formatting human readable numbers with PHP</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/04/23/Formatting_human_readable_numbers_with_PHP"/>		
		<updated>2008-04-23T16:57:00-04:00</updated>
		<published>2008-04-23T16:57:00-04:00</published>
		<content type="html"><![CDATA[	One of my former colleagues, Athanassios Bakalidis, in his latest blog post "<a href="http://abakalidis.blogspot.com/2008/04/java-formatting-number-using-custom.html">Java: Formatting a Number Using a Custom Format</a>", has written about number formatting in Java language. This post made me think about the ways we 're using to print numbers from PHP to HTML output.<br /><br />When we 're dealing with integers, usually it's sufficient to add a<br /><blockquote>style="text-align: right;"</blockquote>to right-align the numbers in a column.<br /><br />Floating point numbers, on the other hand, may require the use of <a href="http://php.net/manual/en/function.number-format.php">number_format()</a> function to properly format them, for example to have the same number of decimals (added to the obvious <a href="http://php.net/manual/en/function.round.php">round()</a>, <a href="http://php.net/manual/en/function.floor.php">floor()</a> and <a href="http://php.net/manual/en/function.ceil.php">ceil()</a> functions).<br /><br />But, what if I wanted to sort an array having two arithmetic columns?<br />Then, I'd use the <a href="http://php.net/manual/en/function.sprintf.php">sprintf()</a> function to zero-pad numeric values, like this (certain sections are omitted):<br /><br /><code>$u0 = mysql_query( $sql, $db) or die( mysql_error());<br />$aa = array();<br />while ($u1 = mysql_fetch_row( $u0)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;$id = $u1[0];<br />&nbsp;&nbsp;&nbsp;&nbsp;$c1 = $u1[1];<br />&nbsp;&nbsp;&nbsp;&nbsp;$aa[$id] = number_format($u1[2]/$c1,4) .":". sprintf("%06d", $c1);<br />}<br />arsort( $aa); reset( $aa);<br />while (list($k, $v) = each($aa)) {<br />&nbsp;&nbsp;&nbsp;&nbsp;list( $v1, $c1) = explode( ":", $v);<br />&nbsp;&nbsp;&nbsp;&nbsp;$c1 = intval( $c1);<br />&nbsp;&nbsp;&nbsp;&nbsp;$v1 = round( $v1, 2);<br />&nbsp;&nbsp;&nbsp;&nbsp;[......]<br />}</code><br /><br />With this technique, one can sort numeric values properly as numbers (although by internally converting them to strings). Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-1782192157924238764?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/-8lLPP3dpDDeaBKqr_SqUYaeeNw/0/da"><img src="http://feedads.g.doubleclick.net/~a/-8lLPP3dpDDeaBKqr_SqUYaeeNw/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/-8lLPP3dpDDeaBKqr_SqUYaeeNw/1/da"><img src="http://feedads.g.doubleclick.net/~a/-8lLPP3dpDDeaBKqr_SqUYaeeNw/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=3njruuBg"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=3njruuBg"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=peDkU1BZ"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=gHuoeBdi"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Hx0zH3kN"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Hx0zH3kN"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Luy0FM1J"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Luy0FM1J"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=9PwRO44E"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=KZ4THf51"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=KZ4THf51"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=XUBOSIM0"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/1gCSI5kfsmY" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/03/22/Twit_from_PHP_with_cURL</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Twit from PHP with cURL</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/03/22/Twit_from_PHP_with_cURL"/>		
		<updated>2008-03-22T12:15:00-04:00</updated>
		<published>2008-03-22T12:15:00-04:00</published>
		<content type="html"><![CDATA[	<p>There are cases you need to update a special <a href="http://twitter.com/">Twitter</a> feed to inform your visitors about something that has happened to your site. Then, this PHP function might be very useful if you add it in your functions arsenal:</p><pre>/* inform twitter about something */<br />function twit( $msg = "")<br />{<br /> $username = "twitter-username";<br /> $password = "twitter-password";<br /> $ch = curl_init();<br /> curl_setopt( $ch, CURLOPT_URL, "http://twitter.com/statuses/update.xml");<br /> curl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE); // change to FALSE for not reporting XML output<br /> curl_setopt( $ch, CURLOPT_POST, 1);<br /> curl_setopt( $ch, CURLOPT_POSTFIELDS, "status=" . urlencode( $msg));<br /> curl_setopt( $ch, CURLOPT_USERPWD, "$username:$password");<br /> ob_start();<br /> $response = curl_exec( $ch);<br /> ob_end_clean();<br /> curl_close( $ch);<br /> return $response;<br />}</pre>As you can see, it only takes a string argument; the message you want to send.  It returns also a string, which is either a true/false value or an XML-formatted <i>response</i>, depending on the value of CURLOPT_RETURNTRANSFER.<p>In order to use this function, you need to have installed the <a href="http://curl.haxx.se/">cURL</a> extension of PHP.  You can check if it's installed quickly with the following command:</p><pre>$ php -i | grep -i curl</pre><p>If cURL is installed, you can expect an output like this:</p><pre>additional .ini files parsed =&gt; /etc/php5/cli/conf.d/curl.ini,<br />curl<br />cURL support =&gt; enabled<br />cURL Information =&gt; libcurl/7.16.4 OpenSSL/0.9.8e zlib/1.2.3.3 libidn/1.0</pre><p>If not, the package you need to install is <a href="http://curl.haxx.se/libcurl/php/">php5-curl</a>.</p> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-6824095400834962548?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/u-4XytLQLumiSfLkK_zmuiKrP5Y/0/da"><img src="http://feedads.g.doubleclick.net/~a/u-4XytLQLumiSfLkK_zmuiKrP5Y/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/u-4XytLQLumiSfLkK_zmuiKrP5Y/1/da"><img src="http://feedads.g.doubleclick.net/~a/u-4XytLQLumiSfLkK_zmuiKrP5Y/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=MeoioFlO"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=MeoioFlO"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=d832LzkG"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=9LiFTbyM"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=JlijaJOG"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=JlijaJOG"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=irmcoJiC"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=irmcoJiC"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=xW8o3Uri"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=uXwCFvsE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=uXwCFvsE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=BPYrX6xM"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/j-kqMpBZA4o" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/03/09/Some_KDE_tips</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Some KDE tips</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/03/09/Some_KDE_tips"/>		
		<updated>2008-03-09T12:18:00-04:00</updated>
		<published>2008-03-09T12:18:00-04:00</published>
		<content type="html"><![CDATA[	It's a beautiful Sunday morning and, in case you 're working with KDE Desktop Environment, here are some tips on using it more productively. Some of them are very old, but still useful.<ul><li>Let's say you 're programming or writing a script and you don't remember the syntax of a command. Bring up the command line (press Alt-F2), enter a hash (#) mark followed by the command name. The man page, in hyperlinked text, will open in Konqueror.</li><li>You can maximize windows in three different ways:<br /><ul><li>Click on maximize with the left mouse button to open to full screen.</li><li>Click on maximize with the middle mouse button to maximize only vertically.</li><li>For horizontal only, use the right mouse button.</li></ul></li><li>Clicking on the title of a window with middle mouse button, pushes it behind the other windows, while it retains its focus. For example, when you 're editing a file, you can check the contents of another window while, in parallel, you can continue editing.<br /></li><li>You can change the desktop wallpaper by dragging an image from a Konqueror window to the desktop and selecting "Set As Wallpaper".</li></ul> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-8748327139164207266?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/rYaXdJ8w5sAOKl-cnqApzGBH9sE/0/da"><img src="http://feedads.g.doubleclick.net/~a/rYaXdJ8w5sAOKl-cnqApzGBH9sE/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/rYaXdJ8w5sAOKl-cnqApzGBH9sE/1/da"><img src="http://feedads.g.doubleclick.net/~a/rYaXdJ8w5sAOKl-cnqApzGBH9sE/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=vjcP9lpt"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=vjcP9lpt"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=hA8lHG1Q"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=a4MsyN1L"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=yFbeqc5V"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=yFbeqc5V"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ZK2x2JJI"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=ZK2x2JJI"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Ky8bfT4G"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=l5msJMhU"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=l5msJMhU"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=iGt0g2AK"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/wQp1MBF6QB8" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/02/24/Always_check_your_fingers_while_being_root</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Always check your fingers while being root</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/02/24/Always_check_your_fingers_while_being_root"/>		
		<updated>2008-02-24T17:20:00-05:00</updated>
		<published>2008-02-24T17:20:00-05:00</published>
		<content type="html"><![CDATA[	Yesterday, while I was reading some very old magazine articles, I remembered a "horror" story that happened to me a long time ago, when I was learning to administer my first Sun Solaris system. It goes like this...<p>I was following the instructions to install some new application and I had to add a new user in /etc/passwd file. I kept a backup copy and I started editing it with vi. What I didn't knew at that time, was that cursor (arrow) keys were not used for moving the cursor and they produced "~" instead. OK, I thought, back to H-J-K-L keys.  I added the new user at the end of the file and saved it. I also logged out from my 'root' account, as my job was finished.</p><p>What I didn't noticed, when I was fiddling with the cursor keys, was that the first two letters of the username of the first account of the file changed to capitals.</p><p> "No big deal", you might say, except that the first account in /etc/passwd file was 'root'! And it became 'ROot', without noticing it!</p><p>Imagine my frustration when I tried to login back to root's account, without knowing what actually had happen! :-(</p><p>I don't remember exactly what error messages I saw, but I ended that by rebooting the machine in single user mode, mounting the root partition in a directory and recovering back the root account.</p><p>What this little story taught me, was to double-check always what I'm doing as root, especially if the keys I'm pressing don't have the expected result.</p> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-5852363470361878497?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/6q2jeqRufBkXvb8CloWv-Db7L9g/0/da"><img src="http://feedads.g.doubleclick.net/~a/6q2jeqRufBkXvb8CloWv-Db7L9g/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/6q2jeqRufBkXvb8CloWv-Db7L9g/1/da"><img src="http://feedads.g.doubleclick.net/~a/6q2jeqRufBkXvb8CloWv-Db7L9g/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=HAkD8drr"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=HAkD8drr"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=yquWwV0D"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=xXmVv0NE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=S0UuEwgk"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=S0UuEwgk"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=XxlP7InG"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=XxlP7InG"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=DV4CQi0U"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=IllcD4or"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=IllcD4or"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=X0y6lUrY"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/eVIy2ZIp7qo" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/02/20/Can_t_eject_cdrom__Try_fuser</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Can't eject cdrom? Try fuser</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/02/20/Can_t_eject_cdrom__Try_fuser"/>		
		<updated>2008-02-21T01:22:00-05:00</updated>
		<published>2008-02-21T01:22:00-05:00</published>
		<content type="html"><![CDATA[	<p>Just a quick note to myself (and anyone else who might be in a similar situation)...</p><p>Sometimes, after I've played some video file written on a cd-rom, I can't eject it because the file is locked/used by another application/daemon (like dbus-launch or dbus-daemon).</p><p>The quicker way I've found to unlock/free the file (and eject the disc) is to use "fuser -k" with the full path specification of the file as an argument, like this:<br /></p><blockquote>fuser -k /cdrom/file.avi</blockquote><p></p><p>If, on the other hand, you just want to see which processes are using a certain file, try these commands from any terminal:<br /></p><blockquote>fuser -v /var/spool/mail/$LOGNAME<br />lsof /var/spool/mail/$LOGNAME</blockquote><p></p> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-555080609685005489?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/iukRDHYeCTbsZNHr7Off_g4hvxk/0/da"><img src="http://feedads.g.doubleclick.net/~a/iukRDHYeCTbsZNHr7Off_g4hvxk/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/iukRDHYeCTbsZNHr7Off_g4hvxk/1/da"><img src="http://feedads.g.doubleclick.net/~a/iukRDHYeCTbsZNHr7Off_g4hvxk/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=tmPrrjF5"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=tmPrrjF5"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=hi90yjFL"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=kA9AnAqR"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=caZ1ZWfA"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=caZ1ZWfA"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=NWXhIKkT"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=NWXhIKkT"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=UdRRPfcl"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=OdxE2Gd9"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=OdxE2Gd9"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=PW1OyfSY"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/RuW5_PNPZQM" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/01/29/How_I_solved_my_memory_problems_(for_free)</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: How I solved my memory problems (for free)</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/01/29/How_I_solved_my_memory_problems_(for_free)"/>		
		<updated>2008-01-29T12:54:00-05:00</updated>
		<published>2008-01-29T12:54:00-05:00</published>
		<content type="html"><![CDATA[	<p>For the last week, I experienced some low memory problems, both in RAM and swap space.  I admit that I'm using Firefox with a lot of addons that I find useful, so I tried, at first, to uninstall some of them (those I'm not using too often).  I had to close also, when not needed, some "always running" utilities, like gkrellm, amarok, kopete and korganizer.</p><p>I have 512 MB RAM in my system and a separate swap partition of the same size in my hard disk.   Although the system worked most of the time (even when I used gcc compiler), it was constantly swapping in and out applications and yesterday evening my swap space reached 0 bytes of free space.</p><p>I thought that an <a href="http://lightoflamp.blogspot.com/2007/08/gparted-saves-day.html">increase of the swap partition size</a> might solve the problem, but I didn't want to fiddle with my disk and I called this solution "plan B".</p><p>As "plan A" I decided to make more swap space by creating a swapfile.   The commands I used are the following:</p><p></p><pre><p># dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576<br /># mkswap /home/swapfile</p><p> Setting up swapspace version 1, size = 1073737 kB<br />no label, UUID=267d82f3-0f53-42d6-bf72-6fc4bf36b8f4</p><p># swapon /home/swapfile<br /># vim /etc/fstab</p><p>where I added the following line:<br />/home/swapfile none    swap    sw 0 0<br /></p></pre><p></p><p>After executing these commands, my swap space increased instantly to 1 GB, without a need to reboot and without any cost (except for 1 GB of disk space of course).</p><p>So far the system is healthy again, with a lot of usable memory, and all my favorite applications are running together as before.</p> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-5639808745069820890?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/_eya1D-VXi46HMMIyuUgC5PAMAs/0/da"><img src="http://feedads.g.doubleclick.net/~a/_eya1D-VXi46HMMIyuUgC5PAMAs/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/_eya1D-VXi46HMMIyuUgC5PAMAs/1/da"><img src="http://feedads.g.doubleclick.net/~a/_eya1D-VXi46HMMIyuUgC5PAMAs/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Q43N5KHY"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Q43N5KHY"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=tBv3TODs"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=1oYOEfIV"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=hxaHaSag"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=hxaHaSag"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=lwU9QJKz"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=lwU9QJKz"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=93fSpLJW"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=SAQeCJX5"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=SAQeCJX5"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=pdMTPx54"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/djyB1Cs71mA" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/01/19/Apache_optimization_by_compressing_pages</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Apache optimization by compressing pages</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/01/19/Apache_optimization_by_compressing_pages"/>		
		<updated>2008-01-19T14:41:00-05:00</updated>
		<published>2008-01-19T14:41:00-05:00</published>
		<content type="html"><![CDATA[	After reading a very interesting article from "<a href="http://www.codinghorror.com/blog/">Coding Horror</a>" blog (<a href="http://www.codinghorror.com/blog/archives/000807.html">Reducing Your Website's Bandwidth Usage</a>), I activated Apache's page compression with the following simple procedure:<br /><pre><br />$ sudo bash<br /># cd /etc/apache2/mods-enabled/<br /># ln -s /etc/apache2/mods-available/deflate.load .<br /># vim /etc/apache2/apache2.conf  [add the following line]<br />    AddOutputFilterByType DEFLATE text/html text/plain text/xml<br /># /etc/init.d/apache2 restart<br /># exit<br />$ <br /></pre> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-6852522182534405480?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/WKs1iAsb-QRNkYJwZJwKlge73kA/0/da"><img src="http://feedads.g.doubleclick.net/~a/WKs1iAsb-QRNkYJwZJwKlge73kA/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/WKs1iAsb-QRNkYJwZJwKlge73kA/1/da"><img src="http://feedads.g.doubleclick.net/~a/WKs1iAsb-QRNkYJwZJwKlge73kA/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=XKUO9qHm"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=XKUO9qHm"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=DspQWPIk"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=NlI2yKjd"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=GzreBt55"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=GzreBt55"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=4koq0mqI"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=4koq0mqI"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=rdAtueoP"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=556ps8xU"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=556ps8xU"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=jSz3lYi0"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/HjMdE_fJL1E" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/01/10/gimptool_installation</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: gimptool installation</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2008/01/10/gimptool_installation"/>		
		<updated>2008-01-11T01:32:00-05:00</updated>
		<published>2008-01-11T01:32:00-05:00</published>
		<content type="html"><![CDATA[	Just a quick note on gimptool installation, since searching with the traditional ways didn't reveal anything useful (at least on the first page of the search results)...<br /><br />In case you need to install a GIMP plugin from source, chances are you 'll need the gimptool utility, which for Debian-based systems, it is hidden into the libgimp2.0-dev package.  After the installation of the libgimp2.0-dev package, you 'll find it as /usr/bin/gimptool-2.0, so you may need to "ln -s" this to ~/bin/gimptool (or another convenient place) as well.<br /><br /><br />If you 're used to compile from source, this procedure might sound familiar, but it's not the easiest one! Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-6199889206524213077?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/LwpxBS8mr9XrqMIfJHvs8mAE2eQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/LwpxBS8mr9XrqMIfJHvs8mAE2eQ/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/LwpxBS8mr9XrqMIfJHvs8mAE2eQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/LwpxBS8mr9XrqMIfJHvs8mAE2eQ/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=GTgMF1Ol"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=GTgMF1Ol"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=dCNFtN3V"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ndAV4Cz0"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=3higBM5L"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=3higBM5L"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=xQ0ghRmm"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=xQ0ghRmm"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=LuVTLU9b"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=dogKdt13"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=dogKdt13"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=nfXSc163"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/bsADcBwyB00" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/12/22/Edit_your_directories_fast</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Edit your directories fast</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/12/22/Edit_your_directories_fast"/>		
		<updated>2007-12-22T22:40:00-05:00</updated>
		<published>2007-12-22T22:40:00-05:00</published>
		<content type="html"><![CDATA[	Suppose you need to rename many files in a directory and you can't remember any nifty way to <a href="http://lightoflamp.blogspot.com/2007/03/bash-quickly-rename-files.html">quickly rename</a> them. In such a case, try vidir.<br /><br />All it does is creating a temporary file with the name of each file properly numbered in a separate line and loading it into the text editor, where you can edit it.  Every change you make in the name or the number of a file is applied to the appropriate directory entry when you save the file.<br /><br />Let's say, for example, you want to exchange the names of two files, file1 and file2. When you run vidir, you 'll see something like this:<br /><blockquote><pre>1        file1<br />2        file2</pre></blockquote>change it to<br /><blockquote><pre>2        file1<br />1        file2</pre></blockquote>and save the file. That's it!<br /><br />Although its name implies the vi editor, don't worry. You can use any text editor you like, as long as you declare it as your EDITOR:<br /><blockquote>$ EDITOR=kate vidir</blockquote> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-1960102798721136813?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/RsrkZApDeahDeRCpx0nABL7xy4s/0/da"><img src="http://feedads.g.doubleclick.net/~a/RsrkZApDeahDeRCpx0nABL7xy4s/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/RsrkZApDeahDeRCpx0nABL7xy4s/1/da"><img src="http://feedads.g.doubleclick.net/~a/RsrkZApDeahDeRCpx0nABL7xy4s/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=QTviImzd"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=QTviImzd"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=BGvxNVs3"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=1xxLQblD"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=0l8Wr2YI"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=0l8Wr2YI"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=QcMra8gr"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=QcMra8gr"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=BhdLHl2g"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ILPhy9wR"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=ILPhy9wR"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=jHlcTeLq"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/QrzQrVCV4_o" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/12/01/Firefox:_autofill_URLs</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Firefox: autofill URLs</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/12/01/Firefox:_autofill_URLs"/>		
		<updated>2007-12-02T01:14:00-05:00</updated>
		<published>2007-12-02T01:14:00-05:00</published>
		<content type="html"><![CDATA[	It may be old news to some (or most) people but it's a useful, productive tip nonetheless, for those using Firefox.<br /><br />If you want to let Firefox auto-fill the address, while you 're typing the first letters, with the most visited URL you have in your history, just follow these steps:<br /><ol><li>open a new tab and write "about:config" at the address box,</li><li>find the "browser.urlbar.autoFill" variable in the list it will present to you when you press Enter,<br /></li><li>double click on it to change its value to true</li></ol>You don't need to restart Firefox, the change is effective immediately. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-6255531398968517930?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/vgTMsj2_xuzFF7NmvIzgCVHvNX8/0/da"><img src="http://feedads.g.doubleclick.net/~a/vgTMsj2_xuzFF7NmvIzgCVHvNX8/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/vgTMsj2_xuzFF7NmvIzgCVHvNX8/1/da"><img src="http://feedads.g.doubleclick.net/~a/vgTMsj2_xuzFF7NmvIzgCVHvNX8/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=j0QSCqNR"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=j0QSCqNR"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=tltPPziY"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=3pzQ96SM"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=d7b05qM3"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=d7b05qM3"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=g5EBUjv0"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=g5EBUjv0"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=KyX1dlHi"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=rYqPdzzq"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=rYqPdzzq"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=woCZyi1D"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/YmCUIoYSDYw" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/11/27/No_more_~_.bashrc_running_</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: No more ~/.bashrc running?</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/11/27/No_more_~_.bashrc_running_"/>		
		<updated>2007-11-27T19:48:00-05:00</updated>
		<published>2007-11-27T19:48:00-05:00</published>
		<content type="html"><![CDATA[	After upgrading KUbuntu 7.04 to 7.10 some days ago, I noticed that my ~/.bashrc startup file stopped running when I opened a new terminal, be it konsole, xterm or (my favorite) gnome-terminal!<br /><br />Today I decided to debug this strange behavior to find what was wrong...<br /><br />I started my research by inserting a line at the start of /etc/bash.bashrc:<br /><blockquote><pre>echo running /etc/bash.bashrc<br /></pre></blockquote>and I noticed that it was displayed twice when I was starting a new terminal.  Then I looked into my ~/.bashrc file (which was working as it should before the upgrade) and found these 3 lines:<br /><blockquote><pre>if [ -f /etc/bash.bashrc ]; then<br />       . /etc/bash.bashrc<br />fi</pre></blockquote>After commenting out these lines, everything worked as expected again and I reinstated the original /etc/bash.bashrc file (without the debugging echo command). Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-6283889515373584116?l=lightoflamp.blogspot.com' />
<p><a href="http://feedads.g.doubleclick.net/~a/LRbagXu2RM0a0F635fuyTs7tqO4/0/da"><img src="http://feedads.g.doubleclick.net/~a/LRbagXu2RM0a0F635fuyTs7tqO4/0/di"></img></a><br />
<a href="http://feedads.g.doubleclick.net/~a/LRbagXu2RM0a0F635fuyTs7tqO4/1/da"><img src="http://feedads.g.doubleclick.net/~a/LRbagXu2RM0a0F635fuyTs7tqO4/1/di"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=aRmUvxOc"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=aRmUvxOc"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=CpAveyjp"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=CMdrq2rT"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=9HzILNTF"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=9HzILNTF"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=queTixTO"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=queTixTO"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ZXfmqQnL"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=M5Wvwg7p"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=M5Wvwg7p"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=4sZmuQTN"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/8okQHYekfW4" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/11/03/Refresh_the_memory_of_bash</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Refresh the memory of bash</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/11/03/Refresh_the_memory_of_bash"/>		
		<updated>2007-11-03T17:59:00-04:00</updated>
		<published>2007-11-03T17:59:00-04:00</published>
		<content type="html"><![CDATA[	Suppose you have the same utility in two different places in your filesystem, one installed by a package you don't really need since you have just installed the same files from source (but in a different directory).  You promptly uninstall the packaged version, but when you try to run the utility, you get something like this:<br /><blockquote>bash: /usr/bin/utility: No such file or directory</blockquote>The shell is still looking to find the old version!<br /><br />To refresh the memory of bash, just run the command:<br /><blockquote>hash -r</blockquote>and after that, when you rerun the utility, the new version will appear. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-544957408705882873?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=l8p6aeHg"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=l8p6aeHg"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=qgthtE1H"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=xOBGlBlq"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=AO7F2tHT"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=AO7F2tHT"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=UMBfadaN"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=UMBfadaN"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=chuKIgqr"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=vyyP7nnH"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=vyyP7nnH"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=g3TkILGM"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/_Z9er2pU7BA" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/10/11/Daily_distribution_of_emails</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Daily distribution of emails</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/10/11/Daily_distribution_of_emails"/>		
		<updated>2007-10-11T23:50:00-04:00</updated>
		<published>2007-10-11T23:50:00-04:00</published>
		<content type="html"><![CDATA[	If you have a busy mailbox on a daily basis, then the following method will give you some more information about your e-mail messages.  This is very useful if you are subscribed to many mailing lists (professional or not) and you want a clean inbox.<br /><br /><ol><li>You have to use procmail to distribute your incoming e-mail messages into appropriate mailboxes.</li><li>You must enable procmail's logging feature by including a line like<br /><blockquote>LOGFILE=$HOME/mail-from</blockquote>into your '~/.procmailrc' file (man procmailrc for more details)</li><li>Download the <a href="http://freshmeat.net/projects/statmail/">statmail</a> PERL script and install it in your '~/bin' directory</li><li>Set up a cron job like the following (everything goes in one line and remember to edit the pathnames):<br /><blockquote>00  00 * * *            /home/username/bin/statmail </li></ol><br />From now on (and every midnight), you 'll receive a new e-mail message containing an analytical report of how many messages you 've received today (or, should I write, yesterday?) and the mailbox they were stored. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-1564563101870937318?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Ww0ztZOy"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Ww0ztZOy"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=EwEP3wpl"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=5Hw4Zp5s"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=xqxbclfE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=xqxbclfE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=u9LfkCZn"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=u9LfkCZn"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=FIiuYGLy"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=d50riVLz"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=d50riVLz"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=gTFQ4odk"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/cXhEiTvEn7w" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/10/02/Unblock_Jango_playing</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Unblock Jango playing</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/10/02/Unblock_Jango_playing"/>		
		<updated>2007-10-02T21:46:00-04:00</updated>
		<published>2007-10-02T21:46:00-04:00</published>
		<content type="html"><![CDATA[	This post is somewhat out of topic, but I think that it will be useful to someone...<br /><br /><a href="http://www.jango.com/">Jango</a> is a startup, still in beta testing, which enables the user to create (and share with friends) specially made internet radio stations. The idea is very good and I decided to ask for an invitation to test the service.<br /><br />My invitation arrived this morning, so I started creating my account and my first jango-music station, which I named "<a href="http://www.jango.com/users/238137?l=0">Classic Rock picks</a>".  But I had a problem: the player could not be started and there was no indication about what went wrong!<br /><br />I emailed jango's feedback team and I got a very prompt reply with 3 possible reasons (thank you Cat). The third of them was actually the root of my problem, which was the blocking of the flash player by the <a href="http://addons.mozilla.org/firefox/433/">Flashblock</a> add-on for Firefox.  All I had to do was to add the "www.jango.com" web address into the Flashblock's permitted websites list and restart Firefox.<br /><br />Jimi Hendrix greeted me singing "Foxy lady"  :-) Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-4066071115996965436?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=MxIj1e5U"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=MxIj1e5U"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=9Kr4PEjl"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=1XiuLbkk"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=fToltKQe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=fToltKQe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=njyOyyQn"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=njyOyyQn"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=RzRLEupp"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=S8VtKPuG"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=S8VtKPuG"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Y8vd4qJs"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/7YvYTQnAO4k" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/09/18/Enable_warnings_in_MySQL</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Enable warnings in MySQL</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/09/18/Enable_warnings_in_MySQL"/>		
		<updated>2007-09-18T09:21:00-04:00</updated>
		<published>2007-09-18T09:21:00-04:00</published>
		<content type="html"><![CDATA[	By default my MySQL setup didn't display warnings. So, when this morning I tried to update a record with a slightly invalid date value, I had the following result:<br /><blockquote>mysql&gt; UPDATE people SET birth ="0000-09-30" WHERE id=1234;<br />Query OK, 0 rows affected, 1 warning (0.01 sec)<br />Rows matched: 1  Changed: 0  Warnings: 1<br /></blockquote>One warning, zero rows changed!  And no clue what went wrong!<br /><br />OK, time to RTFM!  By reading the man page (man mysql), I found that I can enable the warnings on starting the mysql client by issuing: "mysql --show-warnings dbname" or by adding "show-warnings" in the "[mysql]" section of ~/.my.cnf configuration file.  Alternatively, without changing anything, I could see the warning by executing: "show warnings;" at the console prompt.<br /><br />The warning was:<br /><blockquote>Warning (Code 1265): Data truncated for column 'birth' at row 1</blockquote>which revealed nothing to me. By changing the "sql_mode" parameter to traditional<br /><blockquote>mysql&gt; set sql_mode="traditional";<br />Query OK, 0 rows affected (0.06 sec)</blockquote>I had finally a clue:<br /><blockquote>ERROR 1292 (22007): Incorrect date value: '0000-09-30' for column 'birth' at row 1</blockquote><br />So, I changed again the <a href="http://dev.mysql.com/doc/refman/5.1/en/server-sql-mode.html">sql_mode</a> parameter to ALLOW_INVALID_DATES and I solved my little problem! Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-3363207952038839732?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=7KWcWOJR"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=7KWcWOJR"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=mcJSWx9Y"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=346jGrq0"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=2XfkTtmE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=2XfkTtmE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=zTsuxw3Y"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=zTsuxw3Y"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=uFjhFhBU"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=yUBjk4fn"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=yUBjk4fn"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Zd1CpKet"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/roFkamIKtnM" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/09/07/Imprisoned_or_not_</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Imprisoned or not?</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/09/07/Imprisoned_or_not_"/>		
		<updated>2007-09-07T21:36:00-04:00</updated>
		<published>2007-09-07T21:36:00-04:00</published>
		<content type="html"><![CDATA[	Sometimes it is imperative for an application to run in a protected environment, especially if it provides a service (like for example, the apache server).  For this reason, an administrator can use the chroot system call to force a process (or process group) to run under a subset of the file system, denying access to any other parts of it.<br /><br />Another common use of this mechanism is for creating a sandbox for a user, even root, in order to test something without the fear of accidentally destroying the system (although this is not entirely true, since the chroot mechanism cannot by itself be used to block low-level access to system devices).<br /><br />So, how can we find if some application is running in a chrooted jail or not?<br /><br />One way is by running<br /><blockquote>ls -id /</blockquote>to check the inode of the root directory. If it is a large number, then our application is jailed in a chrooted environment. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-282379800618805997?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Zav0kSck"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Zav0kSck"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=po5wEHuc"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=0izVXg46"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=LtaW4YD2"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=LtaW4YD2"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=sSMVsxdy"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=sSMVsxdy"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=EC4AUz2b"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=VGyPjYvF"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=VGyPjYvF"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=NoFj9lqI"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/y8Jw3mmQreA" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/08/06/GPartEd_saves_the_day!</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: GPartEd saves the day!</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/08/06/GPartEd_saves_the_day!"/>		
		<updated>2007-08-06T19:13:00-04:00</updated>
		<published>2007-08-06T19:13:00-04:00</published>
		<content type="html"><![CDATA[	Due to an installation misconfiguration, one of my machines had a very small /boot partition, which I always wanted to increase, but without going into too much trouble like repartitioning/reformatting the disk or reinstalling the whole system, since it was already working as it should.<br /><br />Since I haven't tried anything similar before, I decided to use <a href="http://gparted.sourceforge.net/">GNOME Partition Editor</a>, which I found that it is available as a package (in the usual repositories), as a LiveCD and as a LiveUSB.  Jobs like this can't be done in a live system, so I downloaded the LiveCD version (size: 50 MBytes) and I burned it in a rewritable CD.<br /><br />I rebooted the system from the CD (which is a minimal <a href="http://www.gentoo.org/">Gentoo</a> distribution with FluxBox window manager) and, after a while, the main screen of the partition editor appeared.  Changing the partition sizes is very easy: all I had to do was to select the partition and press the "Resize/Move" button.  After rebooting, it proved reliable too (although I already had a backup, just in case something happened).<br /><br />Since I was happy with it, I tested it also with a friend's system, who wanted to increase the size of his C:, NTFS formatted, drive (his operating system, for the last month, insisted that it had no room available to download and install the updates of the OS).  Boy, 4 GBytes for the system partition are not enough these days?<br /><br />Needless to say that GPartEd worked flawlessly both times.<br /><br />Disclaimer: always have a working backup before doing things like that or you'll remember <a href="http://en.wikipedia.org/wiki/Murphy_law">Murphy's law</a>! Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-7376129929271598843?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=a2HFzkrY"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=a2HFzkrY"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=7ZayAPyP"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=r44p83qb"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=P5YIsuKU"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=P5YIsuKU"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=SloMeY3G"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=SloMeY3G"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=I6RXUdP6"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=YEK5iEoy"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=YEK5iEoy"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=n0vyNXXK"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/X0jd2otGl4Y" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/08/04/Firefox_ScrapBook:_my_locally_hosted_Internet!</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Firefox ScrapBook: my locally hosted Internet!</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/08/04/Firefox_ScrapBook:_my_locally_hosted_Internet!"/>		
		<updated>2007-08-05T05:28:00-04:00</updated>
		<published>2007-08-05T05:28:00-04:00</published>
		<content type="html"><![CDATA[	One of the most useful Firefox plug-ins I've ever installed and used is <a href="http://amb.vis.ne.jp/mozilla/scrapbook/">ScrapBook</a>. This plug-in is like an extension to the well-known "Bookmarks" mechanism, with the added bonus that, instead on not only saving/storing the URL address of a someday-might-prove-useful web page, it can save locally the whole page (images included), a snippet of it, or even a whole site!<br /><br />Its main purpose is to organize these pages into virtual sub-folders, enabling the user to use them for her research or refer to them when there is a need to, and, additionally, (a) search all of them, in full text (featuring a local search engine), (b) comment on them, or even (c) edit them in order to remove unwanted stuff.<br /><br />ScrapBook is an indispensable tool for researchers and casual users alike and I think it should be a part of Firefox distribution.<br /><br />On the other hand, if you don't want to store locally the pages you 've found useful, or if you don't use <a href="http://www.spreadfirefox.com/">Firefox</a> (there is no excuse for that... you SHOULD), there is an on-line alternative solution from Google, <a href="http://www.google.com/notebook">Google Notebook</a>.<br /><br />You must have a Google account to use this service (who doesn't have one these days?) and once enabled, it acts the same way as ScrapBook, except that it saves the pages (or their snippets) to Google's servers instead of the local disk, so they are available from everywhere, provided that you have an internet connection and a browser (and you remember your password of course).<br /><br />Generally, I use both of them, each one for slightly different purposes of my research habits. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='https://blogger.googleusercontent.com/tracker/7664472768379327993-7487639874143209295?l=lightoflamp.blogspot.com' />
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=EVcKC6Z5"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=EVcKC6Z5"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=aH0HFRT5"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Y1Z4ppiJ"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=5z4WCB8k"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=5z4WCB8k"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=F61UUpF8"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=F61UUpF8"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=7vkYrRQH"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=yzivEmyZ"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=yzivEmyZ"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=AByMu6TG"><img src="http://feeds.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/lJN1qDMFrNQ" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/07/30/RSS_feeds_to_my_mailbox</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: RSS feeds to my mailbox</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/07/30/RSS_feeds_to_my_mailbox"/>		
		<updated>2007-07-30T09:37:00-04:00</updated>
		<published>2007-07-30T09:37:00-04:00</published>
		<content type="html"><![CDATA[	I wrote <a href="http://lightoflamp.blogspot.com/2007/06/wikipedia-to-my-mailbox.html">before</a> about how I prefer to read, organize and archive (almost) everything with my mail reader (hey, I just love my <a href="http://www.mutt.org/">Mutt</a> <img src="http://www.mutt.org/image/mutt_button.gif" />), and that is also true for RSS feeds (from the blogs I read frequently and other news sites).<br /><br />Until now, I used to fire up a GUI news reader, gather all new posts from my feeds, export them in a mailbox-formatted file and import them to my mailbox to read.  I have even tried some online (i.e. browser-based) aggregators/readers, but I was not very happy with the whole procedure!<br /><br /><a href="http://packages.debian.org/unstable/mail/rss2email">RSS2email</a> is a very simple program. All it does, when it runs, is to check if there are any new items in the feeds it knows and, if there are, deliver them to a (configurable) email address. I installed the (small) package, added some feeds to test and added a cronjob (my preference is to run it hourly like this: 11 08-23 * * *  /usr/bin/r2e run) to ensure frequent updates.<br /><br />One minor problem however, is that it doesn't read <a href="http://en.wikipedia.org/wiki/OPML">OPML</a> files (special files for exchanging RSS feeds between readers) and since I have many (&gt;100) feeds to read from, I used a bash command to import all of them to RSS2email's database.<br /><blockquote>egrep -o '"http://[^"]*"' newsfeeds.opml | xargs r2e add</blockquote><br />Explanation:<br /><ul><li>newsfeeds.opml is the file where I have my RSS feeds (exported by the other program I used)</li><li>egrep is GNU grep with extended regular expressions support</li><li>-o '"http://[^"]*"'  parses each input line and outputs just the URL of each feed</li><li>xargs runs "r2e add" with every URL previously extracted, adding them to the database file of RSS2email</li></ul><br />OK, I admit it!  I'm a hard-core computer-dinosaur looking for ways to convert all those fantastic GUI programs to "simple" CLUE ones!  Guilty as charged!  :-) Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='http://res1.blogblog.com/tracker/7664472768379327993-8271877933477468215?l=lightoflamp.blogspot.com' />
<a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=UV14ewDe"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=UV14ewDe"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=JARLN5c5"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=8DaOfHon"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=rhA0uhL3"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=rhA0uhL3"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=kDBGvR4G"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=kDBGvR4G"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=tZm6cVdh"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=sNDSw0uM"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=sNDSw0uM"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=S0jjBFWt"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds2.feedburner.com/~r/LightOfLamp/~4/iDHrOL1n-fY" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/07/21/My_current_(external)_IP_address_is...</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: My current (external) IP address is...</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/07/21/My_current_(external)_IP_address_is..."/>		
		<updated>2007-07-21T15:54:00-04:00</updated>
		<published>2007-07-21T15:54:00-04:00</published>
		<content type="html"><![CDATA[	Recently I needed to incorporate in a script my current external IP address, that is the address the internet knows in order to reach my web server. The easiest way I found was to fetch the web page  <a href="http://checkip.dyndns.org/">[checkip.dyndns.org]</a>  using a command like: <code>lynx -dump <a href="http://checkip.dyndns.org/">[checkip.dyndns.org]</a> </code><br /><br />But, since I have a dynamic IP, I thought that it was not a good solution to fetch the above page every 10 minutes.  After all, my router knows its IP before everyone else (ok, besides my ISP), so it is better just to ask the router.<br /><br />Actually this is a nice thought, but the router wants the user to be authorized to get the information. So, after some searching, I found the following solution from the example scripts of Python's pexpect documentation (the file I used in my system is /usr/share/doc/python-pexpect/examples/ftp.py).  All I had to do was to adjust it to my problem.  The final script is this:<br /><blockquote><code>#!/usr/bin/env python<br />import pexpect<br />import sys<br /><br />child = pexpect.spawn('telnet router')<br />child.expect('login: ')<br />child.sendline('PutYourUsernameHere')<br />child.expect('password:')<br />child.sendline('PutYourPasswordHere')<br />child.expect('$')<br />child.sendline('get ip address')<br />child.expect('\n\r([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) *[^ ]+ *ppp-0')<br />ip = child.match.group(1)<br />print "Current IP Address:", ip<br /><br /># The rest is not strictly necessary. This just demonstrates a few functions.<br /># This makes sure the child is dead; although it would be killed when Python exits.<br />if child.isalive():<br />&nbsp;&nbsp;&nbsp;&nbsp;child.sendline('exit') # Try to ask ftp child to exit.<br />&nbsp;&nbsp;&nbsp;&nbsp;child.close()<br /># Print the final state of the child. Normally isalive() should be FALSE.<br />if child.isalive():<br />&nbsp;&nbsp;&nbsp;&nbsp;print 'Child did not exit gracefully.'</code></blockquote><br /><br />Of course, for another router, the prompts and the commands might be different, so the above inputs/outputs will have to be adjusted as well. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...<img src='http://res1.blogblog.com/tracker/7664472768379327993-7959846129628609854?l=lightoflamp.blogspot.com' />
<a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=j1QQGhF0"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=j1QQGhF0"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=QrTZ6RKA"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=41"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=65u4w7iv"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=42"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=slaZFe7b"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=slaZFe7b"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=ELcPPafI"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=ELcPPafI"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=Qz73NFvi"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=52"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=eIYA4j7M"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?i=eIYA4j7M"></img></a> <a href="http://feeds2.feedburner.com/~f/LightOfLamp?a=KRpgEP5X"><img src="http://feeds2.feedburner.com/~f/LightOfLamp?d=129"></img></a>
<img src="http://feeds2.feedburner.com/~r/LightOfLamp/~4/vvOoXVq4s-U" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/07/18/Testing_Opera_Mini_4_beta_simulator</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Testing Opera Mini 4 beta simulator</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/07/18/Testing_Opera_Mini_4_beta_simulator"/>		
		<updated>2007-07-18T17:08:00-04:00</updated>
		<published>2007-07-18T17:08:00-04:00</published>
		<content type="html"><![CDATA[	Today I was testing the <a href="http://www.operamini.com/beta/simulator/">Opera Mini 4 beta simulator</a>.  It's a nice, well built browser. It identifies itself as "Opera/9.50 (J2ME/MIDP; Opera Mini/4.0.8439/20; U; en)" and it renders correctly both images and non-Latin characters (at least, it worked ok with the Greek sites I tested).  However, I didn't liked a couple of things:<br /><ul><li>Why every URL must start with "www." ?</li><li>Where is the Backspace key if I want to erase something I entered by mistake (or the "www." prefix) ?</li></ul>I wish I had an Internet-enabled mobile phone to download and test the real program and not only the simulator. Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=uOEjLle"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=uOEjLle"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ypqELeE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=ypqELeE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=0oTm8Me"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=0oTm8Me"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=zV95iOe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=zV95iOe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=S6c4VrE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=S6c4VrE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=HKbHmSe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=HKbHmSe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Co5Wr7E"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Co5Wr7E"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/135458154" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/06/30/Wikipedia_to_my_mailbox</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Wikipedia to my mailbox</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/06/30/Wikipedia_to_my_mailbox"/>		
		<updated>2007-06-30T10:27:00-04:00</updated>
		<published>2007-06-30T10:27:00-04:00</published>
		<content type="html"><![CDATA[	I'm a frequent reader of <a href="http://en.wikipedia.org/">Wikipedia</a>. I'm even subscribed to "<a href="http://lists.wikimedia.org/mailman/listinfo/daily-article-l">Article of the day</a>" mailing list and every day I receive a random article to my mailbox.  But when I wanted to find information about something, I had to open a new tab in my browser, visit wikipedia, find and read the article and, if there was value for me, save it for future reference... until yesterday!<br /><br />Yesterday, I discovered (and installed) the <a href="http://packages.debian.org/stable/text/wikipedia2text">wikipedia2text</a> package and, to make things easier for me, I wrote a little wrapper function, which I promptly inserted into my ~/.bashrc:<br /><blockquote>wp() {<br />&nbsp;&nbsp;&nbsp;&nbsp;what="$*"<br />&nbsp;&nbsp;&nbsp;&nbsp;wikipedia2text "$what" | mailx -s "wikipedia article: $what" myemail<br />}<br /></blockquote>From now on, while working on a terminal, each time I issue a<br /><blockquote>wp  title-terms</blockquote>a new article will be delivered to my mailbox.<br />Example:    wp context switch Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=cIxycEe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=cIxycEe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=oaNhdZE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=oaNhdZE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=FqRZEde"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=FqRZEde"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=Mc0FTJe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=Mc0FTJe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=ZU1hpjE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=ZU1hpjE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=v3wvbOe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=v3wvbOe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=aTVHBgE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=aTVHBgE"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/133285964" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/05/31/Split_this_e-mail_[digest]_message</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Split this e-mail [digest] message</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/05/31/Split_this_e-mail_[digest]_message"/>		
		<updated>2007-06-01T02:13:00-04:00</updated>
		<published>2007-06-01T02:13:00-04:00</published>
		<content type="html"><![CDATA[	Some times we receive e-mail messages in a digest format, either from mailing lists or other informational newsletters.  From these messages, occasionally, I want to keep just one paragraph or one message and throw away all the rest.<br /><br />So I wrote a little PERL script, called "splitdigest.pl", for doing that and I'm using it from inside Mutt just by pressing 'Z'. It works like this:<br /><ol><li>open ~/.muttrc file and append the following two lines after its last line:<br /><blockquote>macro index Z |'~/bin/splitdigest.pl'\nd<br />macro pager Z |'~/bin/splitdigest.pl'\nd</blockquote>(the above lines remap the key Z to (1) filter the body of the message through splitdigest script, which is located in my ~/bin directory and (2) delete the message)<br /><br /></li><li>create a new file with your favorite editor and insert the following lines to it (just remember to replace username with your login name):<br /><pre>#!/usr/bin/perl -w<br />use strict;<br />use diagnostics;<br />my ($outfile, $line, $i, $k);<br />my (@header, @body);<br />$outfile = "/var/spool/mail/username";<br />open PF, "&gt;&gt; $outfile" or die "Couldn't open $outfile for writing: $!\n";<br />push @header, "From username\@localhost  ",scalar(localtime()),"\n";<br />$i = 0; $k = 0;<br />foreach $line () {<br />      if (($i==0) &amp;&amp; ($line !~ /^$/)) { # read header<br />              if ($line =~ /^Content-Type: multipart\/alternative; /) {<br />                      $line = "Content-Type: text/plain; charset=utf-8\n";<br />              }<br />              push @header, $line if<br />               ($line =~ /^(From|Date|Subject|To|Message-ID|Content-Type|Content-Transfer-Encoding): /i);<br />      }<br />      # read message body<br />      if ($i&gt;0) { push @body, $line if ($line !~ /^$/); }<br />      # flush @body and restart with a new message<br />      if ($line =~ /^$/) {<br />              $i=1;<br />              if ($#body &gt; 0) {<br />                      $k++;<br />                      print PF @header, $line;        # first print header<br />                      print PF @body, $line;          # then body<br />                      @body = ();                     # finally flush body<br />              }<br />      }<br />}<br /># in case the message ends with a non-null line, write the rest<br />if ($#body &gt; 0) { print PF @header,"\n",@body,"\n"; }<br />close PF;<br />print "$k messages found and written to file [$outfile]\n";<br />__END__<br /><br /></pre></li><li>Save the file as "splitdigest.pl" in your ~/bin directory (or wherever you like) and make it executable with chmod:<br /><blockquote>chmod +x ~/bin/splitdigest.pl</blockquote></li></ol>That's all!<br /><br /><br />Additional information:<br /><ul><li>The code above splits the digests where there is a blank line in it, i.e. the separator is the blank line. With a little tweaking you can use a different separator.</li><li>I know that one can edit the whole message in Mutt by 'e'diting it. I'm using this method for its speed and convenience.</li></ul> Visit <a href="http://lightoflamp.blogspot.com">The Light of the LAMP</a> blog for more...
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=YYH5PJe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=YYH5PJe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=JI8zCWE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=JI8zCWE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=zUOMjOe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=zUOMjOe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=BqFr52e"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=BqFr52e"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=lUPJ7OE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=lUPJ7OE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=tTgFRYe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=tTgFRYe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=4EmBFQE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=4EmBFQE"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/133285965" /> ]]></content>
</entry>
<entry>
		<id>http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/05/07/Memory_effects_by_(K)Ubuntu_upgrade</id>
		<author><name>Apostolos P. Tsompanopoulos</name></author>
		<title>The light of the LAMP: Memory effects by (K)Ubuntu upgrade</title>
                <link rel="alternate" type="text/html" href="http://www.kavalablogs.gr/The_light_of_the_LAMP/2007/05/07/Memory_effects_by_(K)Ubuntu_upgrade"/>		
		<updated>2007-05-07T22:42:00-04:00</updated>
		<published>2007-05-07T22:42:00-04:00</published>
		<content type="html"><![CDATA[	A few days after upgrading <a href="http://www.kubuntu.org/">KUbuntu</a> on my laptop (from version 6.10 to 7.04), I noticed that the free memory indication decreased rapidly when I was loading some applications, much faster than before.  Additionally, when it was reaching the amount of 50-60 megabytes left, the whole system went to a situation of continuous hard disk writing/swapping which left no other option for me than to power-cycle it the hard way!  :-(<br /><br />At first, I thought it was something with the new kernel (2.6.20, in place of 2.6.17 I was using until then), so I made the change to my GRUB menu.lst file to load by default the 2.6.17 kernel.  Nevertheless, although the situation got a little better, the problem remained and I had to close Firefox in order to be able to run Opera and vice versa (one very annoying situation for someone who must test his LAMP projects with the most popular browsers).<br /><br />Today I made another change to my system by purging the mdadm package (responsible for software RAID arrays, which I don't use in this computer) and, so far, the system is more stable; at least I can use 2-3 browsers (don't forget Konqueror) simultaneously.<br /><br />The next days will show if the mdadm package was the culprit!<br /><br /><br /><br />UPDATE:<br />I think I found it (finally)... my swap partition was disabled!!!<br />The upgrade process changed the relevant line in /etc/fstab file from<br /><blockquote>/dev/sda5 none swap sw 0 0</blockquote>to<br /><blockquote>UUID=fac6f2c3-34a6-48c6-83f2-eb59c90cb944 none swap sw 0 0</blockquote>which didn't worked as expected.  After I restored the first line in place of the second, I got back my 500 MB swap space.<br /><br />Furthermore, in order to be consistent with the new UUID method, by using the blkid command I found that the correct UUID for the swap partition was "1e93c994-8da0-4666-838f-4dd1452f9a15", so I changed the above line to be:<br /><blockquote>UUID=1e93c994-8da0-4666-838f-4dd1452f9a15 none swap sw 0 0</blockquote>The problem now is that the free command shows that I have 1 GB swap space, whereas with the first method I had 500 MB. I have to investigate this further (hoping that there will be no data corruption in the meantime)...
<p><a href="http://feeds.feedburner.com/~a/LightOfLamp?a=CYK8NS"><img src="http://feeds.feedburner.com/~a/LightOfLamp?i=CYK8NS"></img></a></p>
<a href="http://feeds.feedburner.com/~f/LightOfLamp?a=G3Qunbe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=G3Qunbe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=2dpUafE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=2dpUafE"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=fUlCkSe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=fUlCkSe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=6eRAuIe"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=6eRAuIe"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=OwReAME"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=OwReAME"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=yRvlwge"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=yRvlwge"></img></a> <a href="http://feeds.feedburner.com/~f/LightOfLamp?a=QlnhihE"><img src="http://feeds.feedburner.com/~f/LightOfLamp?i=QlnhihE"></img></a>
<img src="http://feeds.feedburner.com/~r/LightOfLamp/~4/133285966" /> ]]></content>
</entry>
</feed>
