Josh (the blog)

I’ve delivered simple, clear and easy-to-use services for 20 years, for startups, scaleups and government. I write about the nerdy bits here.


@joahua

Bigpond Static IP: An anti-spam measure

A screenshot of BigPond's supposed Static IP demo page

Look carefully at the screenshot above. Something is incongruous.

Yes, that’s right, this “Static IP demonstration” is all about Telstra’s spam filter product (which, incidentally, they charge for — boy am I glad we aren’t using Telstra email as well as Cable in this house!). I clicked through to the demonstration because I was interested to know how exactly one explains the purpose of a static IP to Joe Smallbiz — and the idea that one could creatively demonstrate a number–and a static number no less–seemed too good to miss.

It seems, however, that BigPond’s answer to the great (or should I say bulk…y…) unsolicited email question that floats above the present Internet generation like a puddle doesn’t, is simply to assign everyone static IP addresses and be done with it. Wow. What forward thinking from one of the world’s most notoriously backwards ISPs!

Of course, the whole thing would require an adoption of IPv6 to function, which would defeat the purpose as there would be ample spare resources to acquire once any given IP/subnet got blacklisted, but you know… an interesting concept.

Recursively count files in a directory

find . | wc -l

Outputs all files in current directory piped into the wc utility with -l switch (count number of newlines). The find command outputs directory names as well, so it’s not entirely accurate… but fairly close to.

To do: Learn JavaScript properly

I read an article today on using JavaScript for image previewing without any extra markup, and was, needless to say, suitably impressed. And slightly scared that if I were locked in a room with a computer and no access to the Internet, I couldn’t possibly write something like that. I can hack bits of JavaScript together and come out with something that works (heaven help anyone who has to comprehend it or, worse still, subsequently extend it), but it probably isn’t Doing Things Properly — ironic, because Doing Things Properly is what the whole CSS/(X)HTML web standards groupies thing is about. I’m vaguely ashamed that I can be passionate about presentation and content but completely fail to “get” the behaviour layer of things.

As AJAX becomes more prevalent, there’s less and less excuse (or scope, whilst remaining in the industry!) for failing to comprehend these things. And that scares me a little, whilst being incredibly exciting.

The wonders of floats

I know this has been done before, but I haven’t personally tried making a layout that works like this. Actually, it’s not even quite a layout. Just a well presented list of thumbnails.

You’ll note that the layout looks, at first glance, suspiciously as though it were done in a table. It’s not. Pure list there. Want to see something cool? Resize your window and watch as “columns” appear to add and disappear depending on how much space you’ve got. Haven’t got a massive screen? Firefox users can hold down control and spin their mouse wheel and watch the columns change before their eyes!

Ah, the many magical powers of CSS.

Change JPG quality in a shell

Yeah, so I’m posting the dregs of what I’m learning for another project here. Deal with it! I was rather proud of this little gem, not because it’s amazingly complicated, but just because it saves me so much time and bandwidth (think download, process locally using GUI tools, re-upload).

mogrify -geometry 700x525\> -quality 85 -unsharp 1x1 *.JPG

YMMV with the *.JPG bit… obviously will need changing. This whole thing depends on ImageMagick being installed… but it will be on most platforms (By platforms, I mean real operating systems where you don’t need a graphical display to pull these things off! *puts on seedy hardcore chain smoking Unix geek voice* “I do typesetting and print design from the console, man.”), I’d imagine.