Posts

Apple No More?

My trusty Macbook Pro is 8 years old. A bit like the Argo it is arguable if that's entirely true, since the memory has been increased and the HDD has been replaced by an SSD (if you haven't done this I can't emphasis enough how worthwhile an upgrade it is). But the fact remains that it's elderly and things like running an android emulator are getting too much for it. I've been putting off buying a new machine as long as possible though. Gone are the days when I used to lust after the latest model. Apple seem to be deliberately making their machines less appealing to me. This may be age creeping up on me and an accompanying lack of desire to experience new things, but I don't think so (at least, not in this case). Soldered memory and soldered SSD? Memory I can just about cope with; to be honest I don't find a need to use more than 8GB for anything these days. But I get all itchy at the thought of internal storage you can't replace or upgrade. Add to...

Temperature and the Rasperry Pi

Image
A Nice Hot Pi Although I am not in any way an educationalist, I'm currently working a lot with people who are. One of the things getting a bit of attention lately has been STEM in schools (Science, Technology, Engineering and Maths.) In particular I was interested to hear from a primary-school teacher that "coding" is being emphasised by the various directives they get. By a curious serendipity I needed a cheap server to run a Squid proxy (in a domestic setting). The Raspberry Pi had interested me since its release, but I'd lacked a good enough reason for buying it. Now, however, I pulled the PayPal trigger and bought a Pi3 for £32 (along with a case for £6, a power supply for £7 and a 16GB SD card, preinstalled with NOOBS, for £9). The Raspberry Pi 3 (Model B) Note the long row of GPIO pins at the top, we'll be using them later The snazzy official case Shortly afterwards, a smidge over £50, I had my first Pi. Setup was straightforward, other than...

Microsoft Office and MAKs

I do most of my work on OS X, and that includes all my word processing. So the world of Microsoft Office's rather odd volume licensing scheme was, up to now, something I was blissfully unaware of. Recently though I had to do some IT work for a small company. They said they wanted their company's MS Office installed on some new laptops they had purchased. One problem: they had lost the installation CD. But they had kept a note of their licence key (it was, according to the scribbled note left by the no-longer-working-there IT bod, a "MAK key for Office 2010 Professional"). Easy, I thought. No doubt you seasoned MS folks are shaking your head at my ignorance, but on Mac and Linux having no discs is usually a benefit - they are always out-of-date anyway. Get your installers from the internet. So off I went and downloaded a trial version of Office 2010. All I needed to do was enter the key and it'd work, right? Wrong. "Your licence key is invalid." Hm...
I'm a (sort-of) java developer, so one of the most frequent sys-admin tasks I have to do is install Tomcat on Linux. Since there's usually quite a lag between Tomcat releases and packages appearing in yum repos, I generally do this "by hand". It used to be received wisdom that the way to run Tomcat was "behind" an apache installation, but given improvements in the codebase, the Java VM and the option for it to use the Apache Portable Runtime library, I don't think that's the case any longer. Why run two servers when I really only need one? This means, of course, that it has to start on port 80, and not the default 8080. Which is a problem on linux, as all ports below 1024 are "privileged" and available only to root. Native programs like apache get round this by starting up as root, grabbing the port, then switching to a n0n-root user for their normal operations. This level of native integration is beyond a JVM. You could run Tomcat as root,...
I'm going on holiday tomorrow. (Pauses to whoop gleefully.) This means setting up a holiday auto-responder on my email. Yeah, I know you folks all have your exchange-enabled outlook auto-responder wizard to do this, or your webmail can set it up with a few clicks. But for us old-fashioned types the thing to use is the vacation program. Originally developed by the near-mythical Eric Allman it's now being developed by Chris Samuel and Brian May. (Of Queen fame? Maybe, maybe not.) Download the source from Chris's site: http://www.csamuel.org/software/vacation if your flavour of linux doesn't provide it. (Hint: before it would compile, I had to "yum install gdbm-devel". Your mileage may vary.) Create a file in proper email format in your home directory, and call it .vacation.msg: From: you@yourdomain.co.uk (Your Full Name) Subject: I am on holiday Thanks for your email. Unfortunately, I am currently on holiday and so will probably not see (or reply to) your emai...

MacBook Pro display weirdness

I own a shiny new-model macbook pro, which I delight in very much. However, a couple of months ago I came across an initially very alarming problem which turned out to have a simple fix. I've finally got round to blogging about it in case anybody else should witness the same behaviour. Now, much as I love Apple's hardware and software, I sometimes find their decisions a bit arbitrary and annoying. For instance, they removed a perfectly good DVI port from their macbook pros and replaced it with the new mini-display-port thingy. This means I had to buy two adapters -- one for DVI monitors and another for good ol' VGA. Anyway, that is by-the-by. This story is about what happened when I connected a "big telly" to this preposterously tiny port on a fine day last August. I did this as I wanted to watch a DVD (the most excellent Lives of Others, since you ask). This procedure went well. When finished, I pulled out the displayport adapter. At this point, I noticed that th...

Safari and JQuery problem with fading in

I was recently working on a site where the client wanted a large image slowly faded in when the page loaded. In the past I might have used flash for this, but thought that the same effect could be achieved these days with javascript -- jquery, to be precise. And it can, as two minutes reading the docs will show you. It's in theory as simple as doing $(document).ready(function() { $('div#intro').hide(); $('div#intro').fadeIn(3000); }); This works, but I noticed it gave me a FOUC when viewed in safari (a flash of ugly content). The div would pop up for a microsecond, then vanish, then perform its gentle fadeIn. I first messed around with trying to hide the div before the document was ready, reasoning that the "hide" call was coming slightly too late. But this appeared to make no difference -- and indeed, if you only call hide() without then calling fadeIn() there is no FOUC problem. The actual fix (and I've no clear notion why this works, other than t...