Monthly Archives: October 2012

New phone, and vacation!

So I finally got my Galaxy S3 the other day.  I’d been holding out because as soon as I ordered it I’d lose my unlimited data plan; Verizon is evil, and my previous contract expired five days after the cutoff date they set for people to renew and keep unlimited data.  (mutter, grumble)

I like the phone so far; my only gripes are that its rounded corners make it easy to slip out of my hand, and that you can’t mount it as a USB drive for file transfer.  I’ll solve the first problem with a rubberized skin, but the second apparently has no solution unless I put an entire custom ROM on the phone, which I’m not ready to do just yet.  It does mount as either a camera or a media player, so you can transfer files, it’s just really, really slow.  And it has this nice “feature” where you can still access the storage from the phone even while it’s connected to the computer… just don’t do it with a file manager app or you risk borking your filesystem.  I lost a ton of stuff that way, and had to re-transfer it.  Moral of the story: don’t do anything with your phone while it’s connected to your PC.

Oh, and I’ve got the next two weeks off for vacation.  The first week is actually furlough, so I’m contractually obligated to not even think about work.  I figure it’ll take me that long just to unwind and decompress.  Then that second week will feel like an actual vacation.

See you on Monday the 29th…

Not to toot my own horn or anything…

Yeah, whenever anybody says that, they actually mean they *are* going to brag about something, I know.  I think I just did something kinda cool, though.  See, one of the departments has a few pages of their website on a third-party webhost, due to a long and complicated story that I’m not going to get into because this is already going to be a long explanation.

This hosting company is flexible enough that Danielle could make our template work over there, but there really wasn’t any way to include the departmental navigation files from our site.  They’d just have to edit both the local copy for their pages on our servers, and the hardcoded version on every page on the other web host.  Making it worse was the fact that the webhost only allows a certain number of edits before they start charging every time a file is changed (which still boggles my mind.)

Ordinarily we could just use curl() or the like to fetch the file from our server, but this company doesn’t use PHP.  They still run ColdFusion, of all things.  If ColdFusion has a way to fetch and include offsite files, I don’t know it. But I figured out a way to use jQuery and JSONP to have the pages on the other host talk to our webserver and get the sidebar include file they need.  They just need to source a JS script from our site, and it reads variables from the page to know which navigation files to include.  I could’ve hard-coded it for this one department, but I hate doing that when I can make a tool that can be used again.

But, security! I hear some of you saying.  You’re right that it’s a bad idea to let people fetch files off your site based on javascript code; anybody can mess with it using Firebug or some such, and change the variables.  That won’t work too well here, though; it’s locked down to specific folders and filename patterns (no slashes or .. for instance) plus there are a couple more secuirty features I’m not going to talk about.

If you want more detail, email me.  That’s all for now.