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.
// quickest and dirtiest way to execute a query in PHP ;-) exec("echo 'SELECT r.* " . "FROM get_new_referrers() r " . "LEFT JOIN search_engines se ON ( r.referrer ~* se.pattern AND r.referrer ~* se.query_pattern )" . "WHERE se.id IS NULL' | /usr/local/pgsql/bin/psql -U logminer -At logminer", $lines);
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".
This script is finally invoked by the cron job that processes the logs:
referrers_report.php | mail -s 'New referrers report' email@example.com
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#.
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 this example.
Also, I create a different pipe per user session, since I haven't found a way to create a "local" pipe. An article at Dr Dobb's suggests that it's possible, while MSDN doesn't mention this possibility...
I've zipped up my test solution in case someone else has the same needs.
I've just added LogMiner to Ohloh, 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.
I think that it's a simple way to estimate the effort you put over the time in open source projects.
I'm starting to suspect that spammers try to collect and verify email addresses from PAD files using bogus sites as honeypots.
In fact, lately I've received several mails which are all based on the same template:
Hello, my name is John, and I am an associate of SITEURL
Briefly, here is what we do. We specialize in
software reviews and downloads. While browsing the
web we came across your software and I must say
that we were stunned. We were so amazed by its
outstanding features that we decided to give you
our prestigious 5 stars award and put your
software on our editors choice list. We would be
delighted if you would consider posting it in your
awards section. To find the award please go to
http://SITEURL/adownloadIDOFSOMEKIND.html
If you have time please leave a comment, so that
others can view your remarks.
I would like to take a moment to thank you for
all your devoted work in the software field and
wish you success in your business.
The suspicious points are:
all the sites have the same structure
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...
IDOFSOMEKIND could be used just to verify that the mail reached an user that actually reads the mail and clicks on URL's
I always assumed the designers of the Objective-C language and Cocoa frameworks trust me to know what I'm doing while I find very elegant ways to shoot myself in the foot.
Several months ago, I've added a captcha check to the contact page to stop spammers from flooding my mailbox.
Today, with much surprise, I've received a comment to that post from a guy trying to sell his services:
We the leading Data processing company in Bangladesh. Presently we are processing 300000+ captcha per day by our 55 operators. We have a well set up and We can give the law rate for the captcha solving.
Our rate $2 per 1000 captcha.
We just wanna make the relationship for long terms. can we go forward?
What?! No, we can NOT go forward.
Unbelievable.
I didn't even imagine that someone would employ people just to break captcha barriers and push spam through.
I've just installed the latest Mandriva 2008.1 RC on this fine Asus barebone.
Everything went fine, except that the output of sensors showed too many ALARM messages for my taste... so, here's how I've modified the pre-installed sensors.conf to set some min/max values closer to reality and to hide useless lines:
# Winbond W83627EHF configuration originally contributed by Leon Moonen # This is for an Asus P5P800, voltages for A8V-E SE. chip "w83627ehf-*""w83627dhg-*"
# +12V is in1 and +5V is in6 as recommended by datasheet compute in1 @*(1+(56/10)), @/(1+(56/10)) compute in6 @*(1+(22/10)), @/(1+(22/10)) set in1_min 12.0*0.9 set in1_max 12.0*1.1 set in6_min 5.0*0.95 set in6_max 5.0*1.05
set in4_min 1.6*0.9 set in4_max 1.6*1.05 set in9_min 1.6*0.9 set in9_max 1.6*1.05
# Set the 3.3V set in2_min 3.3*0.95 set in2_max 3.3*1.05 set in3_min 3.3*0.95 set in3_max 3.3*1.05 set in7_min 3.3*0.95 set in7_max 3.3*1.05 set in8_min 3.3*0.95 set in8_max 3.3*1.05
Users with sensitive data might find it comforting to use disk encryption in order to prevent it to fall in the wrong hands, especially when this data is stored on a laptop.
Hovewer, a new research shows that it might be relatively simple to recover the encryption keys for at least three popular products (BitLocker, from Windows Vista; FileVault, from Mac OS X; dm-crypt for Linux), thus defeating this kind of protection.
Today IANA added the first AAAA records for six of the thirtheen authoritative DNS servers that carry the root zone.
In short, this means that as of today one would be able to wander across the Internet without having anything to do with IPv4.
Too bad that virtually no ISP is ready to provide IPv6 connectivity yet
Completing the migration from IPv4 to IPv6 will still take a long time, and it's quite understandable given that we're just talking about changing the base infrastructure of the 'Net
Born in Guastalla the 14th of February, 1978; since I was a child I've always enjoyed disassembling (and re-assembling, often succesfully) everything I could put my hands on.
Eventually I ended up disassembling and re-assembling software... it's not exactly the same thing as dismantling toys, but it can be equally funny
Nota per i connazionali: la maggior parte di questo sito è in inglese, in modo da poter essere compreso dalla maggior parte delle persone che passano di qui.