Older blog entries for Killerbees (starting at number 217)

misprint of the [specify timeperiod]

How apt:

employment rose causing misery for many.
From this, also worth a read.
Have an award.

Syndicated 2010-11-03 14:03:00 (Updated 2010-11-03 14:03:05) from Danny Angus

Note to self, how to get row numbers in a MySQL SELECT

I've often wondered, idly, how to get MySQL to output a row number column, which would rank sorted and grouped results.
Well thanks to this excellent post I've found out how:

SELECT *, @rownum:=@rownum+1 as rank FROM ( 
-- Your Query Goes in Here
        SELECT t.*
        FROM table t
        WHERE something
        group by 2,3,4
        order by 1 desc limit 20
    ) day_rank, (SELECT @rownum:=0) r;

Syndicated 2010-10-20 08:15:00 (Updated 2010-10-20 08:15:56) from Danny Angus

21 Sep 2010 (updated 21 Sep 2010 at 13:11 UTC) »

Note to self, want stats on nfs usage, try this

I thought I'd put this in as well, since I had to google for it, using -n will make iostat provide you with stats for nfs shares too.

iostat -nh 5
You can also use nfsstat

nfsstat -cvn -o nfs

Syndicated 2010-09-21 12:06:00 (Updated 2010-09-21 12:43:03) from Danny Angus

e = internet (a logo for IE9)

I found this fascinating blog post on MSDN's IEBlog about the logo for IE9, thanks to Sam Ruby's wonderful Planet Intertwingly.
You should read it too.

Syndicated 2010-09-17 10:26:00 (Updated 2010-09-17 10:26:45) from Danny Angus

17 Sep 2010 (updated 20 Sep 2010 at 11:23 UTC) »

CAPTCHA for CASH - The end is nigh for the CAPTCHA

I  thought you may like to know (unless I'm the last one to cotton on!) that a scenario we've theorised about on the ASRG mailing list for years is finally here, there's now at least one commercial service that will translate CAPTCHA's for cash.

I found the link (shown below) to a service that will decode captcha's for you for $2 per 1000 successes. (Ironically it was in an ad served to me by gmail.)

So to anyone who ever proposed a spam "solution" that relied on differentiating between people and machines, and doubted us when we told them that the commercial imperative would be its downfall, read this: 

We told you so, and it only costs two bucks for a thousand!
I predict much more of this in time, with costs falling as more competition enters the market, and I honestly think it presages the end of the useful life of the captcha.

That link: http://www.decaptcher.com/client/

-- correction: Kevin H. politely pointed out, in a comment, that I hadn't read it properly
That isn't $2 per success - it's $2 per 1000 successes. Minimum purchase is $10 = 5,000 spam, er, advertising opportunities
Thanks Kevin, I've updated the post to reflect this.

-- updates:  According to ASRG folks

a) This site has been known about since Oct, '09, so yes I am last to the party as ever!

b) Chris Lewis kindly point this out:
... found sweatshops in India quoting some small number of rupees per thousand, claiming to be able to supply up to 250,000 per day.  At _least_ three years ago.
...
Incidentally, some of the spam filter companies, as part of their technology for trying to figure out whether the jpeg is naughty or not, _claim_ they can solve >90% of all captchas on the fly.
c) More intriguingly Steve Atkins said:
There's even a neural net implemented in javascript as a greasemonkey plugin that'll solve some simple captchas in the browser.
 I had a Googlearound and found this, that may interest you http://ejohn.org/blog/ocr-and-neural-nets-in-javascript/

I found that particularly fascinating, because last year Nikki was telling me all about cognitive psychology and various theories of word and character recognition in humans. I still have all that to look forward to, in my OU degree, but I'm beginning to get an idea of the kind of things I could do for my project if I ever get that far!

Syndicated 2010-09-17 09:58:00 (Updated 2010-09-20 11:19:47) from Danny Angus

1 Sep 2010 (updated 1 Sep 2010 at 18:07 UTC) »

note to self, how to change the definer of a mysql stored procedure

This is a useful one if, like us, you find that the account used to create the procedure doesn't have the privileges required to execute it, or perhaps you've revoked the original definers grant. (DoH!)

ALTER PROCEDURE procedure_name SQL SECURITY DEFINER;javascript:void(0)

Syndicated 2010-09-01 16:25:00 (Updated 2010-09-01 17:46:04) from Danny Angus

Facebook, you make me want to cry!

It seems that the way in which facebook chooses an image to show alongside a posted link differs for links posted in different ways.

Oh how fucking hilarious. Not.

On our product page if you "attach" the link, or share it using facebook sharer (http://www.facebook.com/sharer.php) it picks the big product image as the first image in the list for you to choose from. This is a Good Thing, and exactly what we want to achieve.

However if you click the like button, its picking up a random image from sets of smaller images elsewhere on the page.


e.g. Share this dress' page through the sharer, or by "attaching" and you see this image:


but if you use the like button it shows us this image,



which is for this dress.

Arrgghh that's annoying. Get a damn grip facebook, at the very least you could try to be consistent. Read about the principle of least surprise.

Syndicated 2010-09-01 15:48:00 (Updated 2010-09-01 15:58:08) from Danny Angus

31 Aug 2010 (updated 31 Aug 2010 at 14:10 UTC) »

Oh Dear poor facebook!

Facebook appears to be unavailable for many users, our office included.

This looks like a DNS issue, looking up www.facebook.com reveals no answer, but facebook.com does resolve.

So I added this to my hosts file[1], its one of the addresses for facebook.com, and it all came rumbling back.
(update, I've updated the line to include the login hostname)

69.63.181.11 www.facebook.com login.facebook.com

Facebook.. if you're listening, fix your DNS, and you owe me!

[1] Windows users, use notepad, you'll find that file here:
C:\windows\system32\drivers\etc\hosts
Just copy'n'paste the line at the end

Syndicated 2010-08-31 12:59:00 (Updated 2010-08-31 13:35:52) from Danny Angus

note to self, how to use your favourite editor for the crontab without changing it permanently

I like to use nano to edit the crontab, but I don't want to change the default editor.
(Some people are very un-funny about that kind of thing!)

This is the one-liner to use nano, and I seldom remember it.

env EDITOR=nano crontab -e

Syndicated 2010-08-31 12:04:00 (Updated 2010-08-31 12:04:40) from Danny Angus

208 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!