We had a two day window in the rain forecast and that's all it took. The job is finished and looks good. I do notice the roof rolls like the ocean but that was either the way it settled over the years or was built to begin with. For whatever reason the rafters are uneven. Nothing noticeable from the inside but far from all being straight and true when viewed from advantageous angles outside. Like the man said, it's a garage. At any rate the old shingles have been picked up and all that remains is sweeping the perimeter with a magnet to capture errant nails hiding in the grass.
Otherwise I managed to cut up the brush previously removed from behind the garden shed into acceptable sizes and delivered all and sundry to Leaflan along with a couple bags of weed and leaf debris Domestic Services had collected. Now it's time to turn back to unfinished projects and those yet started in continued preparation for the coming winter. More work inside the garage - and I know these posts have been garage centric of late but that's what I'm doing - in making additional storage space along with further organization. This in necessity to actually use the place for work and much of what I will be doing in there can be done after the season turns cold and the snow flies such as building more benches and wiring improvements etc.
So two items have been removed from the 'honey do' list this summer; the fence and now garage roof. Both a matter of picking up the telephone, I can't take much credit for accomplishment on those scores. Nor does it seem the list got all that much shorter, in fact I suspect Domestic Services might have added a couple new items although she maintains I wasn't paying attention formerly and is rather emphatic about that. Not that it matters of course, all things in due time.
• • • • •
September 30, 2009
Minor mods to the website
From the one thing leads to another department, last night I had started coding a MySQL interface in PHP to capture and store bookmarks as a practical exercise and learning experience. Something I've put off doing for some time, I've wanted the functionality not having found anything in the can that suites my tastes in work flow, this morning I tinkered some more before wandering off to another small issue being unable to pin a post to the top of the web log. There have been other times when I wanted to do that but never modified the code, today being another such occasion where I'm weeks behind in posting yet want to push the timeliness of Microsoft's release of their "Security Essentials" package. By the time anybody reads this post, that topic will be old news and thus the reasoning. So now I can pin more timely, important or informative blurbs at the top where all can see it in accomplishment.
Really I need to whip up an editor specifically for this but then I've said the same thing about browser based editing of other back channel support files (such as CSS) as well. A general purpose editor then? Another day for that one I'm afraid. Anyway, then a minor modification to one of the Daynotes pages over at the Charter site. Actually a more substantive change in that Daynotes Classic has been retired from publication and replaced with the new version. All part of a process started a year ago to migrate users away from 'Classic' and onto the pages hosted at Beloitopia but the new page(s) at Charter remain popular and the shared hosting that Beloitopia uses goes offline frequently albeit for short periods and so I'd like both version of the new page available at Charter during such occurrences. Simple enough to replace one with the other, I needed to add links to switch between them in addition to those that take us off site. More of a user friendly feature for me, the links are not obvious at first glance but if you look under the search box at the Charter location... You won't find them at the Beloitopia Daynotes as their unnecessary there. The difference being the side bar.
On the issue of web hosting; I've no real complaints given we get what we pay for and I'm riding free at the moment thanks to Rando who's getting a great deal considering what we have to play with on Beloitopia, it's just not 24/7 reliable. If our pages were of suitable importance to the greater scheme of world peace and unity I suppose we'd consider moving but that's not the case at the moment. I mention this in passing simply because Rando shoveled me an email from the head marketing department bullshitter pointing our their superlative up time. A fallacy both of us can lay to rest I assure you.
• • • • •
October 4, 2009
Self cat.php: an internal PHP source display test
Sunday turned out to be a slow, almost do nothing day but along the way spent a fair amount of time looking at previously written code snippits among wandering thoughts over possible work flow code improvements for this weblog and other small projects. Along the way the idea struck that it would be nice to have a feature within the various scraps of development code to simply show the source without having to log into the server and jump through those (albeit minor) hoops. A simple enough task it seemed, besides I'd already developed similar to large degree when programming the editor used for these pages but that code is more complex and I'd rather something minimal that could be easily dropped into projects as an include file.
(cat (Unix) - Wikipedia - The cat command is a standard Unix program used to concatenate and display files. The name is from catenate, a synonym of concatenate.)
In typical fashion I spent an inordinate amount of time trying to figure out why something that should work didn't. Originally I'd called exec (later passthru) to cat the file in question with the output of that shell command placed in a variable. So far so good, but when I tried to run htmlentities over the resultant variable ran into problems. It didn't work, and I don't to this day know why (the return wasn't an array). Finally I gave up on the idea and used "file_get_contents" which worked the charm and resulted in cleaner code at any rate. Once all was working I distilled the core of it down to the one liner shown below, polished up the test file and uploaded as a demo.
That working to suit, set about modifications in conversion for use as an include file, renamed "_cat.php" in difference and having used the php file ending, is viewed by the server as parse-able script with the ability to display its own source in turn. Appending "?src=true" to the URI triggers the event.
Here's a link to the include file "_cat.php", sourcing itself: _cat.php?src=true
As you can see there has been some steering logic added and server variables used more than once have been placed in common string variable; $file_name. For my purposes I've configured links to normal and source views, placed in the upper right corner using CSS absolute positioning inline. Now all we have to do is incorporate the script with an include statement such as:
<? include '_cat.php'; ?>
For obvious reasons it would be recommended to include this script at the very top of code although not necessary. "What should elsewise be obvious is this being a code development aid, not destined for production environments." </PSA> Anyway, to see it in action I grabbed a chunk of calendar code off the web and built a simple web page around it. For the simple sample example, click here: PHP Calendar Demo
• • • • •
October 5, 2009
Setting up SSL on Perdition
SSL being the secure part of web page to browser transmission and back, running on port 443 would also allow me to bypass Charters port 80 blockade and access a machine here remotely. I've done it in the past and also used non-standard ports to accomplish same along with SSH and various VPN lash ups, currently using the PPTP protocol built into Windows XP for the later. Not much here to worry about security wise, it's more about connectivity and allowing others easy access to potential resources here. That's the general line of thought but what piqued my curiosity today was how much an encumbrance the latest browsers bestow upon a self signed cert.
For those not up on this stuff, a self signed cert can be generated by anyone, but since it cannot be authenticated against a known certificate authority, there is no assurance of authenticity as in me being who I say I am. And while it serves the purpose of encrypting communication, or in my case - bypassing HTTP port 80 for HTTPS port 443 - browsers will pitch an alert (with dire warnings) until an exception is granted. Something that might throw many users off stride. So really it's easier and more convenient (or at least as easy) to append a port number on the back of a web address such as - http://mywebserver.com:1080 - and go in that way.
Actually, I use Dynamic DNS to keep track of my home IP which I learn can be configured to append any requisite port number for us. If we don't need encryption this is the way to go. - DynDNS.com
Looking around I didn't have a web server online that was setup for SSL so I pressed "Perdition" into the role. Plus it had been long enough since the last time that I had no chance of remembering the steps involved to enable Apache and make the cert. So it was off to Google and this time landed at Apache SSL install method - Ubuntu forums, which worked the charm on my Debian box. I'll leave the address here for reference.
• • • • •
October 6, 2009
Got my flu shot for this year
The regular one, not the H1N1 or whatever... According to the pharmacist (who administered the shot - and did a fine job) the latter won't be released for a couple weeks and even then, the amounts available will be severely limited. Admittedly I've not been paying close attention but it sounds like no inoculation for most of us this year. That leaves the alternative of common sense and basic hygiene. We might exercise it, but will the others?
• • • • •
October 7, 2009
Lawn Mow #15
Once again did the deed with Aqua-Bitch, or the Green Machine, whatever pet name of the day might be applied. Font, back and side, it all needed doing.
•
On a side note; am having a mild reaction to the flu shot just like every other year I've gotten one. Best described as feeling "a little off", lasts maybe half a day. Will be better by morning.
• • • • •
October 8, 2009
PHP Array Day - Save & Restore
The weather is cool and clammy. Rain off and on, I stayed in most of the day, head down with PHP scripting. I'm learning. A matter best accomplished by doing, leastwise for me it works, I'm far enough along the curve now that projects and their processes are becoming more love than labor. Working with arrays seemed to take top billing this time, a fundamental construct of infinite utility, the chapter and verse of it found throughout the internet but for the asking. So comes the simple matter of saving an array to disk for later retrieval.
At the moment I'm using an array saved to disk as a cache for several web pages needed during development of another application. Reading from a saved array instead of pulling 300K of source data across the internet each iteration, has brought process run time down to .05 seconds from approximately 3 and I feel better not banging somebody's server to death in testing.