November 20th, 2014

Alfa MiTo

Today's kamikaze cyclist

I really shouldn't pad out NaBloPoMo with driving posts, but today's kamikaze cyclist deserves special mention...

This clown chose to hug the right-hand side of the lane down the hill by Titchfield, entering a right-turn lane without turning right, and then veering across the dividing line into the other side of the road. Possibly he thought he was being smart by leaving a car's width of space to his left, but I try not to undertake someone unless the traffic is queueing and I'm especially not going to undertake a kamikaze cyclist who shouldn't be there as I've now got no clue where he's going to go.

Then we got to the lights at the bottom which turned red with plenty of time to spare, at which point he signalled left and moved over. Initially he appeared to slow for the lights, but then he went straight through the red light, did not turn left, and cut across the traffic now entering from the left on a (for them) green light.
  • Current Music
    Ralph McTell - The Mermaid and the Seagull [The Best of]
  • Tags
    ,
Tall ships (porthole)

Slightly improved file uploader

Anyway, enough ranting about nutters on the road. Remember the file uploader I hacked together earlier this year? Well, I discovered a slight flaw when using it with the Wii U - the filename provided by the console is static, and so later uploads overwrite earlier ones. That's easily fixed...

Collapse )

The change is only a few lines - the call to move_uploaded_file has been replaced with

      $pathinfo = pathinfo($_FILES['file']['name'][$i]);
      $dest = $pathinfo['filename'] . strftime('-%Y%m%d-%H%M%S.') . $pathinfo['extension'];
      move_uploaded_file($_FILES['file']['tmp_name'][$i], $dest);


The result is each uploaded file has the current date and time appended to it (for example, vorpal.jpeg becomes vorpal-20141120-205045.jpeg). Obviously this will still overwrite files if you manage to upload the same filename multiple times within the same second, to which my answer is meh! As before, feel free to use it under the 3-clause BSD license.