Tuesday 28 February 2017

Greenalade

Following on from last year

Due to the shortage of Яuislip oranges in Seville I had to wing it
with 
a grapefruit
a lime
three Ippolito oranges
638g jam sugar
362g Demerara sugar

This time I put the peel into a vacuum flask, added 300ml boiling water and left it overnight. It still had a little too much bite so it went into a jug in the microwave, five minutes on full then left to cool before mixing everything together in a big pan for the final boil.
It was a bit too sweet so I added the juice of three lemons.
Sampled two days later, splendid, Mrs Cooper would've been chuffed

Friday 24 February 2017

Photoshop script for continuous Facebook cover and profile images

Facebook cover images are 851 x 315 pixels.
Profile images are 180 x 180.

If you copy the Facebook page and measure the cover image it's 851 x 315 but the profile is 160 x 160. It's also 336 high to the bottom of the profile.

So, start with an image 851 *18/16 = 957  x  336*18/16 = 378

Crop out the profile 180 x 180
Restore the original
Resize to 851 width
Crop out top 851 x 315

or copy the script below into a text file called Rolands_FBtrick.jsx and save it with the Photoshop scripts
in

C:\Program Files (x86)\Adobe\Adobe Photoshop CS2\Presets\Scripts

Next time Photoshop is started it will be available to run


It's not quite perfect but unless you're aligning grooves on a gramophone record it'll probably be good enough.

This darkening gradient is added to the cover image by the Facebook system
I'm saving that for another day

To get the profile to match the cover, add this gradient as the top layer, scale so it covers the whole image and set blend mode to darken.

=======copy script after here=======

/*
CS2 Script to produce Cover & Profile images for Facebook from an original which must be 957 x 378 pixels or it will be resized. Output files default to the source folder and _Profile & _Cover are appended to the names. Jpeg quality is 60. Edit as required below
If you want to match the gradient on the profile image, set it as the top layer and select it before running the script.
*/
var NewW=957; NewH=378; FBW=851; FBH=315; //don't have to be global but they're easier to edit here

function SaveForWeb(Suffix) {
  if (stopflag){return false;}
  try {
      Piccy.path;
    }
  catch(err) {
      alert('Please save the image and try again');
      stopflag=true;
      return false;
  }
var JpegQuality = 60; // <<<<=========== edit jpeg quality between 0 & 100

if (Suffix=='Profile') {
      Destn=Folder(app.activeDocument.path).selectDlg("Choose folder to save the files and click OK. Default is the original folder\n\nJpeg quality is "+JpegQuality);
    }
if (Destn==null){
  stopflag=true;
  return false;
}

//-----------------Use 2nd line below if you always want to save to the original folder and avoid the dialog
Filename=File(Destn + "/" + Piccy.name.slice(0, Piccy.name.length-4) + "_" + Suffix + ".jpg");
//  Filename=File(Piccy.path + "/" + Piccy.name.slice(0, Piccy.name.length-4) + "_" + Suffix + ".jpg");
//-----------------
  if(Filename.exists){
    var Warning=Filename.toString();
    Warning= Warning.slice(3, Warning.length);
    if(!confirm(Warning + " already exists\n\nDo you want to replace it?")){
      stopflag=true;
      return false;
    }
    Filename.remove();
  }
  var sfwOptions = new ExportOptionsSaveForWeb();
    sfwOptions.format = SaveDocumentType.JPEG;
    sfwOptions.includeProfile = true;
    sfwOptions.interlaced = 0;
    sfwOptions.optimized = true;
    sfwOptions.quality = JpegQuality;
  Piccy.exportDocument(Filename, ExportType.SAVEFORWEB, sfwOptions);
}

function main(){
  if (documents.length==0){alert('No image open'); return false;}
  Piccy=app.activeDocument;
  var savedState = Piccy.activeHistoryState; //save original
  var userPrefUnits = app.preferences.rulerUnits; // in case units aren't pixels
  if (userPrefUnits !== Units.PIXELS){app.preferences.rulerUnits = Units.PIXELS;} //change to pixels & reinstate at the end
  if (Piccy.width !== NewW & Piccy.height !== NewH){Piccy.resizeImage(NewW,NewH,null,ResampleMethod.BICUBICSHARPER);}
// bounds are left, top, right, bottom -ScriptListener order is Top, Left, Btom, Rght
//var bounds = [23, 198, 203, 378]; // values from ScriptListener
  var bounds = [22, 199, 202, 379];
  Piccy.crop(bounds);
  SaveForWeb("Profile");
  Piccy.activeHistoryState = savedState;
  app.activeDocument.activeLayer.visible = false;
  Piccy.resizeImage(FBW,null,null,ResampleMethod.BICUBICSHARPER);
  bounds = [0, 0, 851, 315];
  Piccy.crop(bounds);
  SaveForWeb("Cover");
  if(userPrefUnits !== Units.PIXELS){app.preferences.rulerUnits = userPrefUnits;}
  Piccy.activeHistoryState = savedState;
}
var stopflag=false;
var Piccy;
var Destn;
main();


Monday 20 February 2017

do us a favour


Remember this?

if you get this could you please reply?
this is a new email thingy that I have set up to use a contact form on Julias website but yahoo and gmail have sophisticated antispam precautions which rejects unauthorised emails. I have managed to become a "permitted sender"  which works for email to yahoo but it'd be nice to check others.
It's a right pita, I'm not yet approved for the contact form but softly, softly....
It's called NoReply cos if I ever get it to work the account will be reset to reject all incoming emails but at the moment it's a regular email address
ta

ps not to bother if it gets blocked ;-)
ps2 Julia thinks I'm nuts

Thanks to all who replied, these are the responses:

  • AOL
    This is the Spam Firewall at host mail-gw.unlimitedwebhosting.co.uk.
    I'm sorry to inform you that the message below could not be delivered.
    When delivery was attempted, the following error was returned.
    <name@aol.com>: host mailin-04.mx.aol.com[64.12.88.131] said: 521 5.2.1 :
    AOL will not accept delivery of this message. (in reply to end of DATA command)
  • outlook.com
    here's the reply mate.   No idea what you're talking about and Julia's right.   You're barking.
  • google.com
    Yeah it worked.
    Yeah your nuts 😉
    Xx.
  • westhaddon.net (via mout.kundenserver.de, blacklist checker I think)
    I thought it was spam - and you are nuts!  :0)
  • homie.mail.dreamhost.com
    Landed OK in my inbox - sorry about the shoddy reply time!
  • outlook.com
    Assuming you've not totally broken cPanel, maybe you'll get this?
  • smtp2.cali.co.uk
    gottit.
So as a webmaster I'm not even a webapprentice

Part 2

The contact form is working now thanks to a very helpful chap at unlimitedwebhosting, hereinafter referred to as UWH, and it sends messages to me and back to the sender if requested, apart from to AOL. So I went onto AOL.com and found a link to click to apply to be able to send emails to them. Chrome’s hijacked the mailto thingy so I copied the link and sent it from blueyonder. Shortly afterwards I realised that I probably should’ve sent it from the address on UWH. Anyway, the reply arrived and guess what?

Yep, straight in the spam trap

So I sent another one from noreply, received the response and followed the instructions. You have to telnet in from the mail server which is a bit of an impossibility so I telneted in from here and the connection kept dropping out. Last bit to fill in was

Comments or Notes (Optional)
it's all too hard, the only losers will be AOL clients whilst you still have some
<telex>bi</telex>

Bitter or what?

I might continue this, on the other hand I might not, on the other hand as a metallurgist might've once said...........

I have a Ticket-ID:817640 from AOL which sort of implies that almost a million people have had some sort of problem over the years

btw, I have been using email since before the internet. Yep, the good ol' days of Compuserve which was bought by AOL.....

Then the internet arrived and you could get into it through Compuserve via the Spry Mosaic thingy, later known as a browser, if you had the patience and enough pennies for the 'phone call

to be continued, possibly but probably not

Just one last thing, AOL accepts emails directly from noreply but not those generated by the contact form
Game over




Sunday 12 February 2017

Windows Live Mail, POP3 > IMAP, transferring folders and other neuroses

In days of yore you'd set up your email program to send messages through an SMTP server and receive them from a POP3 server. Nowadays with mobile 'phones there is another (™©® A.R.T) protocol called IMAP which allows simultaneous connections and lots of clever stuff.
The POP3 system was good as it allowed for automatic deletion of messages from the server after you'd received them.
A while ago, virginmedia.com implemented the IMAP protocol and the automatic POP deletion no longer worked so it meant logging on through a web browser occasionally to delete the clutter; this was also the only way to check the spam trap, so I decided to setup IMAP access.
All well and good until I tried to move the forty odd folders from one account to another, err you can't.
Windows Live Mail, hereinafter referred to as WLM,  has a Folders tab where you can do 5/8 of bugger all.


The thought of creating another 40 folders and moving all the files wasn't all that appealing and then I realised that I didn't want to do that at all.


So archive stuff needs to go under the Storage Folders and not in the same area as before or they'll all be copied to the email server. Anyway, you still can't move them unless you cheat.

Close WLM if it's running.

This week, WLM stores the messages here:
C:\Users\Roland\AppData\Local\Microsoft\Windows Live Mail\
so open that location in Windows Explorer and find your email account, in my case it's Blueyonder. d3a
Open that and copy the folders you cherish to a safe location, then copy them all from there to:
C:\Users\Roland\AppData\Local\Microsoft\Windows Live Mail\Storage Folders
and here's a couple by way of an example.


Start WLM and have another look, you'll now see these two in the storage area
But there's more. Go back to Windows Explorer and you'll see this

Do all file copying with WLM dead or, better still, get a twelve year old to do it for you.

Time for a pint

Friday 10 February 2017

Can Blogger handle PHP?

'; if (strpos($_SERVER['HTTP_USER_AGENT'], 'obile') !== FALSE) { echo 'It\'s a mobile
'; }else{echo 'It\'s a pc
';} ?>


I'll take that as a 'no' then

Wednesday 8 February 2017

The Mighty Kenwood restored

The images and words are for grown ups. If you end up cut or electrocuted you're not really grown up enough.

>> New part from eSpares <<

Brilliant service from both companies and the bits were delivered within a couple of days.
The support webs on the new casting are much larger than the original. I wonder how many failed...design fault?

Here's a closeup of the fracture

If you took it apart then reassembly is just the reverse.


Another thing that was past its best was the little grindery thing otherwise known as AT320A Multi Mill Attachment. The clips on the nylon drive coupling had busted and it kept falling out so I bought a new unit from eSpares. I took the old one apart out of interest and found it full of gunk, this is a cotton bud that had been soaked in meths.

I rebuilt it with the food grade grease and found it better than new. So much so that I did the same to the new one. The assembly comes apart easily, a Mole grip on the blade and a strap wrench on the rotor, grip the flange that's arrowed not the nylon drive coupling, it's a left hand thread.


Here's a scrap section of the bush, notice how the new one has a groove in the centre, I filled that with grease.


Finally, instead of slinging the old one out, I used blobs of silicone sealant to hold the coupling in, it's early days but it's working.

Couldn't resist the final picture,

left = new                               right = old
 
weird or what?