<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://tellini.info/blog/feeds/atom.xml" rel="self" title="Simone 'Wiz' Tellini" type="application/atom+xml" />
    <link href="http://tellini.info/blog/"                        rel="alternate"    title="Simone 'Wiz' Tellini" type="text/html" />
    <link href="http://tellini.info/blog/rss.php?version=2.0"     rel="alternate"    title="Simone 'Wiz' Tellini" type="application/rss+xml" />
    <title type="html">Simone 'Wiz' Tellini</title>
    <subtitle type="html">To strive, to seek, to find, and not to yield.</subtitle>
    <icon>http://tellini.info/blog/templates/default/img/s9y_banner_small.png</icon>
    <id>http://tellini.info/blog/</id>
    <updated>2008-08-17T23:11:39Z</updated>
    <generator uri="http://www.s9y.org/" version="1.3">Serendipity 1.3 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://tellini.info/blog/archives/72-Steps.html" rel="alternate" title="Steps" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-08-17T23:09:31Z</published>
        <updated>2008-08-17T23:11:39Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=72</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=72</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/2-Photos" label="Photos" term="Photos" />
    
        <id>http://tellini.info/blog/archives/72-guid.html</id>
        <title type="html">Steps</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="serendipity_imageComment_center" style="width: 161px"><div class="serendipity_imageComment_img"><a href="http://www.flickr.com/photos/wiz78/2769799397/" title="Steps"><img src="http://farm4.static.flickr.com/3273/2769799397_ece55d6494_m.jpg" alt="Steps" /></a><br />
</div><div class="serendipity_imageComment_txt">A glimpse of my hometown, in the historic centre</div></div><br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/71-Quote-of-the-Day.html" rel="alternate" title="Quote of the Day" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-08-05T05:53:09Z</published>
        <updated>2008-08-05T06:01:52Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=71</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=71</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/3-Quotes" label="Quotes" term="Quotes" />
            <category scheme="http://tellini.info/blog/categories/9-Software-Development" label="Software Development" term="Software Development" />
    
        <id>http://tellini.info/blog/archives/71-guid.html</id>
        <title type="html">Quote of the Day</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <blockquote>[...] a good programmer cultivates the virtue of laziness. (But not just any laziness: you must be aggressively, proactively lazy!)</blockquote><br />
<br />
<em>-- Chris Pine</em>, dealing with the <a href="http://blogs.msdn.com/steverowe/archive/2008/05/15/design-principle-don-t-repeat-yourself.aspx">DRY rule</a> 
            </div>
        </content>
        <dc:subject>laziness</dc:subject>
<dc:subject>quotes</dc:subject>
<dc:subject>software development</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/70-I-am-interested-in-purchasing-a-text-link-to-my-site-on-yours.html" rel="alternate" title="&quot;I am interested in purchasing a text link to my site on yours&quot;" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-08-01T19:27:00Z</published>
        <updated>2008-08-01T19:32:53Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=70</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=70</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/1-Site" label="Site" term="Site" />
    
        <id>http://tellini.info/blog/archives/70-guid.html</id>
        <title type="html">&quot;I am interested in purchasing a text link to my site on yours&quot;</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've just received a suspicious email:<br />
<br />
<blockquote>Hello,<br />
<br />
I am interested in purchasing a text link to my site on yours - tellini.info . Could you please advise what is the price for advertising space on your site? <br />
<br />
Thank you in advance<br />
</blockquote><br />
<br />
Why suspicious?<br />
<br />
For starters, I don't get that many visitors to justify the many advertising offers I've been receiving lately.<br />
<br />
Also, if you were serious about your offer, you'd send a better email, at least you would properly introduce yourself. Instead the sender used an address like "yahoo.comrosecamara@centrum.cz", but set a reply-to to a different mailbox. I've googled a bit and the first address seems a known <a href="http://www.google.it/search?hl=it&rlz=1B2GGGL_itIT202IT202&q=rosecamara%40centrum.cz&btnG=Cerca&meta=&aq=t">scammers fake email</a>.<br />
<br />
Finally, searching for the mail content on Google, brought me to <a href="http://www.arejae.com/blog/interested-in-purchasing-text-link-advertisement.html">this post of another blogger</a> who's had the same experience. It contains a link that explains <a href="http://blogbitesman.net/2007/12/20/just-saying-no-to-link-spam/">why these people need those links</a>. <br />
<br />
In conclusion, this is an open answer to whoever is going to ask again: I'm not interested in helping you with your advertising spam! 
            </div>
        </content>
        <dc:subject>contextual advertising</dc:subject>
<dc:subject>search engines</dc:subject>
<dc:subject>seo</dc:subject>
<dc:subject>site</dc:subject>
<dc:subject>spam</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/69-Rain-is-coming.html" rel="alternate" title="Rain is coming" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-07-31T05:08:52Z</published>
        <updated>2008-07-31T05:16:57Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=69</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=69</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/2-Photos" label="Photos" term="Photos" />
    
        <id>http://tellini.info/blog/archives/69-guid.html</id>
        <title type="html">Rain is coming</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="serendipity_imageComment_center" style="width: 240px"><div class="serendipity_imageComment_img"><a href="http://www.flickr.com/photos/wiz78/2703660367/" title="Rain is coming (3/3)"><img src="http://farm4.static.flickr.com/3072/2703660367_19d1d9c44b_m.jpg" alt="Rain is coming (3/3)" /></a><br />
</div><div class="serendipity_imageComment_txt">A picture shot during the past weekend...</div></div><br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/68-Quote-of-the-Day.html" rel="alternate" title="Quote of the Day" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-07-12T19:15:14Z</published>
        <updated>2008-07-12T19:19:13Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=68</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=68</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/3-Quotes" label="Quotes" term="Quotes" />
            <category scheme="http://tellini.info/blog/categories/9-Software-Development" label="Software Development" term="Software Development" />
    
        <id>http://tellini.info/blog/archives/68-guid.html</id>
        <title type="html">Quote of the Day</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <blockquote>Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.</blockquote><br />
<br />
<em>-- Richard Cook, read on <a href="http://www.freesoftwaremagazine.com/columns/dont_compare_gnu_linux_windows_or_macos_they_are_not_same_game">FSM</a></em> 
            </div>
        </content>
        <dc:subject>idiots</dc:subject>
<dc:subject>quotes</dc:subject>
<dc:subject>software development</dc:subject>
<dc:subject>universe</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/67-Quote-of-the-Day.html" rel="alternate" title="Quote of the Day" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-07-07T04:21:04Z</published>
        <updated>2008-07-07T04:21:04Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=67</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=67</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/3-Quotes" label="Quotes" term="Quotes" />
            <category scheme="http://tellini.info/blog/categories/9-Software-Development" label="Software Development" term="Software Development" />
    
        <id>http://tellini.info/blog/archives/67-guid.html</id>
        <title type="html">Quote of the Day</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <blockquote>[...] as we all know, premature optimization is the root of all evil.</blockquote><br />
<br />
<em>-- from a <a href="http://lists.apple.com/mailman/listinfo/cocoa-dev/">cocoa-dev</a> email</em><br />
<br />
amen! 
            </div>
        </content>
        <dc:subject>optimization</dc:subject>
<dc:subject>quotes</dc:subject>
<dc:subject>software development</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/66-Windows-Vista-Bonus.html" rel="alternate" title="Windows Vista Bonus" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-07-03T00:25:40Z</published>
        <updated>2008-07-03T00:25:40Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=66</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=66</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/8-IT-Technology" label="IT &amp; Technology" term="IT &amp; Technology" />
    
        <id>http://tellini.info/blog/archives/66-guid.html</id>
        <title type="html">Windows Vista Bonus</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Windows Vista demand is so strong that Dell is offering a <a href="http://direct2dell.com/channel/archive/2008/06/26/xp-down-for-the-count.aspx">Windows Vista Bonus</a> to its customers.<br />
<br />
What is it?<br />
<br />
It's the option to have <a href="http://direct2dell.com/smallbusiness/archive/2008/05/01/windows-vista-downgrade-service-amp-xp-end-of-life.aspx">Windows XP pre-installed</a>, of course! <img src="http://tellini.info/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /> 
            </div>
        </content>
        <dc:subject>it &amp; technology</dc:subject>
<dc:subject>vista</dc:subject>
<dc:subject>windows</dc:subject>
<dc:subject>xp</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/65-Pawns-Revolution.html" rel="alternate" title="Pawns Revolution" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-06-25T05:02:51Z</published>
        <updated>2008-06-25T05:02:51Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=65</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=65</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/2-Photos" label="Photos" term="Photos" />
    
        <id>http://tellini.info/blog/archives/65-guid.html</id>
        <title type="html">Pawns Revolution</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="serendipity_imageComment_center" style="width: 240px"><div class="serendipity_imageComment_img"><!-- s9ymdb:7 --><a href="http://www.flickr.com/photos/wiz78/2607440855/" title="Pawns Revolution di Wiz78, su Flickr"><img src="http://farm4.static.flickr.com/3024/2607440855_63b72481ff_m.jpg" width="240" height="160" alt="Pawns Revolution" /></a></div><div class="serendipity_imageComment_txt">Experimenting with my new camera...</div></div><br />
 
            </div>
        </content>
        <dc:subject>chess</dc:subject>
<dc:subject>macro</dc:subject>
<dc:subject>photos</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/64-Whos-linking-to-your-site.html" rel="alternate" title="Who's linking to your site?" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-06-20T21:57:28Z</published>
        <updated>2008-06-20T22:34:27Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=64</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=64</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/11-SysAdmin" label="SysAdmin" term="SysAdmin" />
    
        <id>http://tellini.info/blog/archives/64-guid.html</id>
        <title type="html">Who's linking to your site?</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                If you're using <a href="http://logminer.tellini.info/">LogMiner</a> to analyse your Apache/IIS logs, here's an easy recipe to be notified of sites that send visitors your way.<br />
<br />
First, let's define a Pg/PLSQL function to extract the new referrers:<br />
<div class="sql" style="text-align: left"><br /><span style="color: #993333; font-weight: bold;">CREATE</span> TYPE new_referrer <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #66cc66;">&#40;</span><br />&#160; &#160; site_id&#160; &#160; &#160; &#160; &#160;int8,<br />&#160; &#160; site_name&#160; &#160; &#160; &#160;text,<br />&#160; &#160; referrer&#160; &#160; &#160; &#160; text,<br />&#160; &#160; hits&#160; &#160; &#160; &#160; &#160; &#160; int<br /><span style="color: #66cc66;">&#41;</span>;<br /><br /><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">OR</span> <span style="color: #993333; font-weight: bold;">REPLACE</span> <span style="color: #993333; font-weight: bold;">FUNCTION</span> get_new_referrers<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />RETURNS SETOF new_referrer <span style="color: #993333; font-weight: bold;">AS</span> $body$<br />&#160; &#160; DECLARE<br />&#160; &#160; &#160; &#160; rec&#160; &#160; &#160; &#160; &#160;new_referrer;<br />&#160; &#160; &#160; &#160; lastRef&#160; &#160; &#160;int8;<br />&#160; &#160; BEGIN<br /><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">SELECT</span> <span style="color: #993333; font-weight: bold;">INTO</span> lastRef CAST<span style="color: #66cc66;">&#40;</span> value <span style="color: #993333; font-weight: bold;">AS</span> int8 <span style="color: #66cc66;">&#41;</span><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">FROM</span> catalog<br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">WHERE</span> name = <span style="color: #ff0000;">'LastReferrer'</span>;<br /><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">IF</span> lastRef <span style="color: #993333; font-weight: bold;">IS</span> <span style="color: #993333; font-weight: bold;">NULL</span> THEN<br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> catalog <span style="color: #66cc66;">&#40;</span> name, value <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'LastReferrer'</span>, <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span>;<br />&#160; &#160; &#160; &#160; &#160; &#160; lastRef := <span style="color: #cc66cc;">0</span>;<br />&#160; &#160; &#160; &#160; END <span style="color: #993333; font-weight: bold;">IF</span>;<br /><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">FOR</span> rec <span style="color: #993333; font-weight: bold;">IN</span><br />&#160; &#160; &#160; &#160; &#160; &#160; EXECUTE <span style="color: #ff0000;">'SELECT s.id AS site_id, s.name AS site_name, r.referrer, tmp.hits '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'FROM ( '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'&#160; &#160;SELECT site, referrer, COUNT(*) AS hits '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'&#160; &#160;FROM accesses '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'&#160; &#160;WHERE referrer &gt; '</span> || lastRef ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'&#160; &#160;GROUP BY site, referrer '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">') tmp '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'JOIN sites s ON s.id = tmp.site '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'JOIN referrers r ON tmp.referrer = r.id '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'WHERE r.extern = true '</span> ||<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">'ORDER BY s.name, tmp.hits DESC, r.referrer'</span><br />&#160; &#160; &#160; &#160; LOOP<br /><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">RETURN</span> NEXT rec;<br /><br />&#160; &#160; &#160; &#160; END LOOP;<br /><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">UPDATE</span> catalog<br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">SET</span> value = <span style="color: #66cc66;">&#40;</span> <span style="color: #993333; font-weight: bold;">SELECT</span> MAX<span style="color: #66cc66;">&#40;</span> id <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">FROM</span> referrers <span style="color: #66cc66;">&#41;</span><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">WHERE</span> name = <span style="color: #ff0000;">'LastReferrer'</span>;<br /><br />&#160; &#160; &#160; &#160; <span style="color: #993333; font-weight: bold;">RETURN</span>;<br />&#160; &#160; END;<br />$body$ <span style="color: #993333; font-weight: bold;">LANGUAGE</span> plpgsql;<br />&#160;</div><br />
<br />
Then, a little PHP script to run the query and format the results:<br />
<div class="php" style="text-align: left"><br /><span style="color: #808080; font-style: italic;">#!/usr/local/bin/php</span><br /><span style="color: #000000; font-weight: bold;">&lt;?php</span><br /><br />&#160; &#160; &#160; &#160; <span style="color: #0000ff;">$lines</span>&#160; &#160; = <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />&#160; &#160; &#160; &#160; <span style="color: #0000ff;">$lastSite</span> = <span style="color: #ff0000;">''</span>;<br /><br />&#160; &#160; &#160; &#160; <span style="color: #808080; font-style: italic;">// quickest and dirtiest way to execute a query in PHP ;-)</span><br />&#160; &#160; &#160; &#160; <a href="http://www.php.net/exec"><span style="color: #000066;">exec</span></a> <span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">"echo 'SELECT r.* "</span> .<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #ff0000;">"FROM get_new_referrers() r "</span> .<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #ff0000;">"LEFT JOIN search_engines se ON ( r.referrer ~* se.pattern AND r.referrer ~* se.query_pattern )"</span> .<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<span style="color: #ff0000;">"WHERE se.id IS NULL' | /usr/local/pgsql/bin/psql -U logminer -At logminer"</span>,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$lines</span> <span style="color: #66cc66;">&#41;</span>;<br /><br />&#160; &#160; &#160; &#160; <span style="color: #b1b100;">foreach</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$lines</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$line</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$parts</span> = <a href="http://www.php.net/explode"><span style="color: #000066;">explode</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'|'</span>, <span style="color: #0000ff;">$line</span>, <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">&#41;</span>;<br /><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0000ff;">$lastSite</span> != <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">&#91;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br /><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/printf"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span> .<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">"-------------------------------------------------------<span style="color: #000099; font-weight: bold;">\n</span>"</span> .<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">"Referrers for %s<span style="color: #000099; font-weight: bold;">\n</span>"</span> .<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #ff0000;">"-------------------------------------------------------<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">&#91;</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;<br /><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$lastSite</span> = <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">&#91;</span> <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#93;</span>;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span><br /><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/printf"><span style="color: #000066;">printf</span></a><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">"[%d] %s<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>"</span>, <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">&#91;</span> <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">&#93;</span>, <span style="color: #0000ff;">$parts</span><span style="color: #66cc66;">&#91;</span> <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;<br />&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span><br /><span style="color: #000000; font-weight: bold;">?&gt;</span></div><br />
<br />
The query above grabs the referrers for every site available in the DB, filtering requests coming from known search engines to reduce the level of "noise".<br />
<br />
This script is finally invoked by the cron job that processes the logs:<br />
<div class="bash" style="text-align: left"><br />referrers_report.php | mail -s <span style="color: #ff0000;">'New referrers report'</span> email@example.com<br />&#160;</div> 
            </div>
        </content>
        <dc:subject>apache</dc:subject>
<dc:subject>iis</dc:subject>
<dc:subject>logminer</dc:subject>
<dc:subject>logs</dc:subject>
<dc:subject>referrers</dc:subject>
<dc:subject>sysadmin</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/63-Under-a-clouded-sun.html" rel="alternate" title="Under a clouded sun" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-06-17T00:22:56Z</published>
        <updated>2008-06-17T00:22:56Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=63</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/2-Photos" label="Photos" term="Photos" />
    
        <id>http://tellini.info/blog/archives/63-guid.html</id>
        <title type="html">Under a clouded sun</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div align="center"><br />
<a href="http://www.flickr.com/photos/wiz78/2577466919/" title="Under a clouded sun on Flickr"><img src="http://farm4.static.flickr.com/3155/2577466919_53efd165ee_m.jpg" width="180" height="240" alt="Under a clouded sun" /></a><br />
</div><br />
 
            </div>
        </content>
        <dc:subject>clouds</dc:subject>
<dc:subject>photos</dc:subject>
<dc:subject>silhouette</dc:subject>
<dc:subject>sun</dc:subject>
<dc:subject>tree</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/62-Quote-of-the-Day.html" rel="alternate" title="Quote of the Day" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-06-07T19:50:39Z</published>
        <updated>2008-06-07T19:50:39Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=62</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=62</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/3-Quotes" label="Quotes" term="Quotes" />
    
        <id>http://tellini.info/blog/archives/62-guid.html</id>
        <title type="html">Quote of the Day</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <blockquote>Intelligence is the ability to avoid doing work, yet getting the work done.</blockquote><br />
<br />
<em>-- Linus Torvalds</em> 
            </div>
        </content>
        <dc:subject>quotes</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/61-Single-instance-per-session-application-with-argument-passing.html" rel="alternate" title="Single instance per session application with argument passing" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-06-04T19:44:00Z</published>
        <updated>2008-06-04T19:07:14Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=61</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/9-Software-Development" label="Software Development" term="Software Development" />
    
        <id>http://tellini.info/blog/archives/61-guid.html</id>
        <title type="html">Single instance per session application with argument passing</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Suppose you want to create an application which you want to limit to a single running instance, like some image viewers do for example. Also, you need different users on a Terminal Server not to conflict with each other. Oh, and you're coding in C#.<br />
<br />
A possible solution to the problem is the one described in <a href="http://www.flawlesscode.com/post/2008/02/Enforcing-single-instance-with-argument-passing.aspx">this Flawless Code post</a>.<br />
<br />
What I didn't like is, it requires the 3.5 version of the framework, while I preferred to be able to run on machines with only 2.0 installed. So I've replaced the NamedPipeClientStream/NamedPipeServerStream with a P/Invoke-based implementation based on <a href="http://blog.paranoidferret.com/index.php/2007/07/25/interprocess-communication-using-named-pipes-in-csharp/">this example</a>.<br />
<br />
Also, I create a different pipe per user session, since I haven't found a way to create a "local" pipe. An article at <a href="http://www.drdobbs.com/windows/184416711">Dr Dobb's</a> suggests that  it's possible, while <a href="http://msdn.microsoft.com/en-us/library/aa365150(VS.85).aspx">MSDN</a> doesn't mention this possibility...<br />
<br />
I've zipped up my <a href="http://files.tellini.info/SingleInstanceApp.zip">test solution</a> in case someone else has the same needs. 
            </div>
        </content>
        <dc:subject>.net</dc:subject>
<dc:subject>c#</dc:subject>
<dc:subject>ipc</dc:subject>
<dc:subject>software development</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/60-How-much-would-it-cost-to-rewrite-it.html" rel="alternate" title="How much would it cost to rewrite it?" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-06-03T00:13:44Z</published>
        <updated>2008-06-03T00:13:44Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=60</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/4-Software" label="Software" term="Software" />
            <category scheme="http://tellini.info/blog/categories/9-Software-Development" label="Software Development" term="Software Development" />
    
        <id>http://tellini.info/blog/archives/60-guid.html</id>
        <title type="html">How much would it cost to rewrite it?</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've just added <a href="http://logminer.tellini.info/">LogMiner</a> to <a href="http://www.ohloh.net/projects/logminer">Ohloh</a>, a site that offers an interesting feature: it can analyse a project source code and estimate how much it would cost to hire a development team to recreate the project from scratch.<br />
<br />
I think that it's a simple way to estimate the effort you put over the time in open source projects.<br />
<br />
Here's the resulting figure for LogMiner:<br />
<div align="center" style="border-style: none"><br />
<script type="text/javascript" src="http://www.ohloh.net/projects/14626/widgets/project_partner_badge"></script><br />
</div> 
            </div>
        </content>
        <dc:subject>logminer</dc:subject>
<dc:subject>software</dc:subject>
<dc:subject>software development</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/59-A-new-way-to-collect-email-addresses-to-spam.html" rel="alternate" title="A new way to collect email addresses to spam?" />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-05-30T02:36:30Z</published>
        <updated>2008-05-30T02:54:35Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=59</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/8-IT-Technology" label="IT &amp; Technology" term="IT &amp; Technology" />
    
        <id>http://tellini.info/blog/archives/59-guid.html</id>
        <title type="html">A new way to collect email addresses to spam?</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I'm starting to suspect that spammers try to collect and verify email addresses from <a href="http://www.asp-shareware.org/pad/">PAD</a> files using bogus sites as honeypots.<br />
<br />
In fact, lately I've received several mails which are all based on the same template:<br />
<br />
<blockquote><br />
Hello, my name is  John, and I am an associate of<br />
<em>SITEURL</em><br />
<br />
	Briefly, here is what we do. We specialize in<br />
software reviews and downloads. While browsing the<br />
web we came across your software and I must say<br />
that we were stunned. We were so amazed by its<br />
outstanding features that we decided to give you<br />
our prestigious 5 stars award and put your<br />
software on our editors choice list. We would be<br />
delighted if you would consider posting it in your<br />
awards section. To find the award please go to<br />
http://<em>SITEURL</em>/adownload<em>IDOFSOMEKIND</em>.html  <br />
<br />
<br />
	If you have time please leave a comment, so that<br />
others can view your remarks. <br />
<br />
<br />
	I would like to take a moment to thank you for<br />
all your devoted work in the software field and<br />
wish you success in your business.<br />
</blockquote><br />
<br />
The suspicious points are:<br />
<ul><br />
 <li>all the sites have the same structure</li><br />
 <li>they don't even pretend not to be fake: the search function never works, the content appears only in some pages and never point to valid files, etc...</li><br />
 <li><em>IDOFSOMEKIND</em> could be used just to verify that the mail reached an user that actually reads the mail and clicks on URL's</li><br />
</ul><br />
<br />
Am I paranoid? 
            </div>
        </content>
        <dc:subject>download sites</dc:subject>
<dc:subject>it &amp; technology</dc:subject>
<dc:subject>pad</dc:subject>
<dc:subject>spam</dc:subject>

    </entry>
    <entry>
        <link href="http://tellini.info/blog/archives/58-If-at-first-you-dont-succeed...-try,-try-again....html" rel="alternate" title="If at first you don't succeed... try, try again..." />
        <author>
            <name>Simone</name>
                    </author>
    
        <published>2008-05-19T23:57:02Z</published>
        <updated>2008-05-20T00:13:34Z</updated>
        <wfw:comment>http://tellini.info/blog/wfwcomment.php?cid=58</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://tellini.info/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    
            <category scheme="http://tellini.info/blog/categories/12-Coding-fun" label="Coding fun" term="Coding fun" />
    
        <id>http://tellini.info/blog/archives/58-guid.html</id>
        <title type="html">If at first you don't succeed... try, try again...</title>
        <content type="xhtml" xml:base="http://tellini.info/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Here's another <em>interesting</em> piece of code I've just digged up in a C# application I'm reviewing.<br />
<br />
If you can come up with a bright idea about what those try/catch blocks are supposed to do, you've got more imagination than me... <img src="http://tellini.info/blog/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" /><br />
<br />
<div class="csharp" style="text-align: left"><br /><span style="color: #FF0000;">class</span> Foo<br /><span style="color: #000000;">&#123;</span><br />&#160; &#160; &#160; &#160; <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">int</span> bar;<br /><br /><span style="color: #008080; font-style: italic;">// ...snip...</span><br /><br />&#160; &#160; &#160; &#160; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> GetNewBar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <br />&#160; &#160; &#160; &#160; <span style="color: #000000;">&#123;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #FF0000;">int</span> ret = <span style="color: #FF0000;">0</span>;<br /><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0600FF;">lock</span> <span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span><span style="color: #000000;">&#41;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #000000;">&#123;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0600FF;">try</span> <span style="color: #000000;">&#123;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; bar++;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ret = bar;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #000000;">&#125;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#123;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0600FF;">try</span> <span style="color: #000000;">&#123;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; bar++;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ret = bar;<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #000000;">&#125;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #000000;">&#125;</span><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #000000;">&#125;</span><br /><br />&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0600FF;">return</span> ret;<br />&#160; &#160; &#160; &#160; <span style="color: #000000;">&#125;</span><br /><br /><span style="color: #008080; font-style: italic;">// ...snip...</span><br /><span style="color: #000000;">&#125;</span><br />&#160;</div> 
            </div>
        </content>
        <dc:subject>coding fun</dc:subject>
<dc:subject>fun</dc:subject>
<dc:subject>software development</dc:subject>

    </entry>

</feed>