Thursday, 19 September 2013

iPhone Call blocking available on iOS 7

Following my previous post on how to block callers on iOS6. With iOS7 it is now finally built into the system - you just go to Settings->Phone->Blocked and add whoever you [don't] like! You can also add to the Blocked list from Settings->Messages->Blocked or Settings->Facetime->Blocked. Note: Once you've blocked them they won't be able to Call, Message, or Facetime you.

Monday, 16 September 2013

Scam: Amazon complimentary £50.00 Gift Card

I looked at my inbox today and saw what initially looked like a very generous offer from Amazon - too good I thought... But the email looked pretty genuine - the to and from addresses were good (though full email headers revealed a potentially dubious return address), the graphics and wording seemed pretty good. The only odd thing was that they used a redirection, which is something they don't normally do. Plus unfortunately don't make it easy to find out where their links actually take you without clicking on them. So I clicked on it and it brought up a very good version of  Amazon's login page. The URL looked curious as it wasn't your normal 'http' scheme, it was a 'data' one (e.g. data:text/html;base64,PCFET0NUWVB...) which I'd not see much. What they have done is encode the entire page in the URL using 'base64' encoding. Looking at the links on the page they all seem genuine on the surface but they have added their own subverted javascript which would steal your login and password if you attempted to login. You can decode the base64 encoding to check, either by viewing source on your browser or just to make sure by copying the whole URL and running:
base64 -D -i amazon-scam.url -o amazon-scam.html
Fortunately a few people have twigged that it's a scam and there's a discussion on Amazon's help pages

So basically if something looks too good to be true - it usually is!

Wednesday, 11 September 2013

Disappearing log plots and lines

I was doing some plotting using iPython --pylab which uses the handy matplotlib to draw things. The stuff I was plotting was a bit all over the place so I thought I'd switch to log mode using pyplot.yscale() (though you can also use axes().set_yscale()):
Suddenly a few of my lines just went missing - What was the problem here ?

Basically it comes down to the fact that some lines/points were at zero which is problem for a logarithmic representation as the log of zero is -infinity (-∞). Of course iPython has a work around which is to use their symlog axes scale, which combines log and linear scales using a threshold linthreshy at which they change:
You can also have a problem with negative values and log plots as the log of a negative number cannot be represented in normal (real) numbers (use need complex numbers for that). But you can get around that in iPython using the symlog as well - as explained here.
Note: All these commands work for the x axes as well - just change the 'y' for an 'x'.