Posted about 2 months ago (25 February 2016 5:32 pm) by David Preston
A space, not a non-breaking space, just an ordinary space. Can't be that hard, can it? Well, you would think so. Or I'm rubbish at googling the right thing.
I was working on a project at work, and adding schema.org markup which involved wrapping stuff in
<span>s. Which in turn choked my HTML minifier and caused one particular space to disappear. Took me ages to find the solution; how to actually insert an entity for a space.
yup 32, those of us who are old enough remember 32 is the ASCII code for a space. Obvious, eh?
Categories: Web Development
Posted about 3 months ago (13 February 2016 12:39 pm) by David Preston
This is one of those posts that is more of an aide-mémoire for me than anything else, although I will be pleased if it helps anyone else.
The background was that I was going to write another blog post (not this one), but before then I wanted to change the width of the .container div and make it a bit wider. But I couldn't remember my own ftp login (embarrassing). So, Pro Tip 1, hi thee along to portableapps.com and set up a USB thumb drive with a few useful apps, including FileZilla Portable, Notepad++ Portable and IrfanView Portable. There are loads of others as well, but these three form the crux of this story.
"But why" I hear you ask, "portable versions?". Good question. Plenty of reasons, not least being guaranteed availability of programs you need and are familiar with, plus you (I) can save your (my) ftp password in my portable FileZilla and never need to remember it. TBH I don't even know it; I reset it on my hosting control panel using LastPass in Chrome, but that doesn't work in desktop programs (so far as I know) and just copy/pasted it into FZ.
Right, so that's that sorted. Now to edit my site's CSS. Open the hosting in FZ, right-click main.css and click View/Edit. And Aptana Studio opens up (in its own good time) from my hard drive. Well, that's a bit rubbish. Nothing against Aptana per se, but I stopped actually using it ages ago. Atom is my current development editor of choice, with Notepad++ for quick edits to almost anything. So in my desktop instance of FZ at work I have NP++ set as default editor for everything, and it would be nice to have FZ Portable use other portable apps on the thumb drive to open files for editing.
After Googling around a bit, I found this Superuser answer for a different portable platform, which gave me enough help to solve my problem. What I ended up with was in FZ Portable, go to 'Settings - File editing - Filetype associations' and enter these lines -
Line 4 was interesting. I originally had htaccess and gitignore as file types, but that didn't work as FZ sees them as '.' files. Anyhow, all those file types now open in their respective portable colleagues.
Categories: Web Development
Posted about 9 months ago (19 August 2015 10:29 am) by David Preston
Erudite (or nosy) visitors may have noticed that I run this blog through a free CloudFlare account. This is a Good Thing, however it was breaking my ProcessWire admin (not a Good Thing), with the default CloudFlare optimisations.
It turns out that the trick is to create a CloudFlare 'Page Rule' for dpreston.com/processwire/* (the asterisk wildcard character is important), such that the rule description reads 'Apps: Off, Performance: Off, Security: On, Cache level: Bypass cache'.
Then it all works again. Phew.
Categories: Web Development
Posted about 1 year ago (13 February 2015 4:05 pm) by David Preston
I use Google a lot - most people probably do. Usually nothing worth even a raised eyebrow comes of it but today has been significantly different. The big G has thrown me a series of curveballs all day.
First off, some background - this morning I bought tickets to watch Chic at the Apollo in Manchester next month. The resulting emails arrived in my Gmail inbox and were duly archived. Somewhat later I realised I had no idea of the Apollo's location in Manchester, so I hopped on Google. What I saw on the Google Maps page made me smile. The email had had the date and time of the gig, and Google had read (and understood) this information and presented a reminder on the page. That's definitely a 'wow'. I fully expect that my phone will remind me about the gig as well, when the time comes, although I want to leave that as a surprise so I haven't checked.
Now the first 'wtf'. I was googling a postcode and noticed the description (in the image). WTF Google? Your own robots.txt file excludes your own crawler? I did try to have a look at the Google Maps robots.txt file but it was a 404. Which is a bit of a wtf in itself.
Second 'wtf' is a cracker. Google is currently (at the time of writing) showing a Google Doodle to mark the start of the Cricket World Cup. When you click on said image, it takes you to a SERPs page about the competition, headed by the widget shown in the image. Which is all fine and dandy until you notice the note at bottom right (highlighted). "All times are in British Summer Time". Google, you're drunk.
It's February. British Summer Time (daylight saving time elsewhere in the world) doesn't start until the last weekend in March, when the clocks go forward one hour. So, the times in that widget, are they really GMT+1? Or is the note just bunkum? WTF?
Posted about 2 years ago (2 November 2014 1:28 pm) by David Preston
I was clicking through some folders of old (very old, actually) stuff, and found and old website that I had at the beginning of the century. It was a blog in all but name, even though I referred to it at the time as my Angling Diary. The files I found ran from November 2000 to June 2001. I used to fish a lot around then!
I thought it would be a bit of fun to reproduce it here, even with some of the tiny, horrible, pixelated photos, for which I apologise.
You can find all of the posts in the category From my old Angling Diary.