Skip to content

Archive for October, 2010

comment

treatees

2010 October 31
 
by dnorman

2010-10-31 treatees.jpg

a skeleton and a pirate walk up to a door…

carver

2010 October 30
 
by dnorman

2010-10-30 carver.jpg

Evan concentrates as he carves his first solo pumpkin. He designed the face, sketched it out, and carved it all on his own.

moroccan

2010 October 29
 
by dnorman

2010-10-29 moroccan.jpg

we headed out to the Moroccan Castle for dinner tonight. Evan is now a big fan of chickpeas, couscous, and eating in fake tents.

Easy server monitoring script

2010 October 29
 
by dnorman

I manage or monitor a few servers, and it’s a good idea to keep an eye on how they’re holding up. The Linux uptime command is all I need – show me how long the server’s been up (or if it’s cycled recently – power hiccup?), and CPU load averages.

I just whipped up a dead-simple solution to let me embed the uptime reports from the servers into my retro homepage.

I’m quite sure there are better and/or more robust ways to do this, but this is what I came up with after maybe 2 minutes of thought.

On each of the servers, I added a shell script called “uptimewriter.sh” (in my ~/bin directory, so located at ~/bin/uptimewriter.sh). I made the file executable (chmod +x ~/bin/uptimewriter.sh) and used this script:

#!/bin/sh
echo "document.write('"`uptime`"');"

All it does is wrap the output of the uptime command in some javascript code to display the text when embedded on a web page. I then added it to the crontab on each of the servers, running every 15 minutes, and dumping the output into a file that will be visible via the webserver.

*/15 * * * *  ~/bin/uptimewriter.sh > ~/public_html/uptime.js 2>&1

Every 15 minutes, the uptimewriter.sh script is run, and output into a javascript file that can be pulled to display on a web page.

Then, on my retro home page, I added code to run the javascript file:

<script src="http://home.darcynorman.net/uptime.js" type="text/javascript" charset="utf-8" async defer></script>

When called from a web page, that will render the output of the uptime command, wrapped in a document.write() call as per the uptimewriter.sh script, displaying it nicely:

Screen shot 2010-10-29 at 11.51.32 AM.png

I can do some more work to style it a bit, so it wraps more nicely, but it’s a decent start.

parked

2010 October 28
 

2010-10-28 parked.jpg

the province denied my driver’s license medical renewal, so I get to stay parked until it gets reviewed. bureaucracy is awesome.

Tips for using WordPress as a website manager

2010 October 28
 
tags:
by dnorman

I’m working on a project that involves building a website to organize and present a bunch of content. We could do it in raw HTML, but it makes more sense to use a content management system. We could do it in Drupal, but my ability to make Drupal look good is somewhat lacking. So, I’m using a site on UCalgaryBlogs to take advantage of WordPress’ content management features. Here’s the basic how-to:

Basic setup:

First, create a page. Creatively call it “Home” or something. Go to Settings > Reading and set it as the front page.

Next, create your content as pages. Take advantage of WordPress’ parent-page feature to nest the pages as deeply as you want. I disabled comments and trackbacks on all pages, to keep it cleaner (and nobody’s likely to comment on the pages anyway – we’ll provide a feedback system for that).

I am using (at least for now) the default twenty-ten theme. It’s pretty complete, and looks great. Pages show up in the main navigation bar, and get full drop-down hierarchical menus built for them.

Enable the Pages widget under Appearance > Widgets. Makes it easier for people to scan to find a page, without having to hunt and seek through all drop-down menus. It’s trivial to provide both ways of navigating.

Plugins that help:

With that in place, WordPress becomes a very robust content management system. Much easier to build a website with a team of people through WordPress, than it is to collaborate over static HTML or some of the other options. Easy.

funkfog morning

2010 October 27
 

2010-10-27 funkfog morning.jpg

a thermal inversion hung over the city, trapping the stink beneath the clouds. the valley stunk like rotting farm gas.

cotton

2010 October 26
 

2010-10-26 cotton.jpg

colourful supplies at the local medical clinic

McLuhan’s global village, ca 1960

2010 October 26
 
tags: ,
by dnorman

Stephen posted a link to this newly rediscovered video of Marshall McLuhan discussing media on CBC’s Explorations documentary series in 1960. This was 4 years before Understanding Media was published. It’s well worth watching. It strikes me that this kind of deep, theoretical presentation/discussion would likely be impossible to broadcast now.

video-takedown.jpg

UPDATE: As of October 27, 2010, the video was taken down from YouTube, due to a copyright violation claim by CBC. I suppose they’re planning to rebroadcast the 50 year old video at some point?

Screen shot 2010-10-27 at 1.31.17 PM.png

I’m sure McLuhan would have something to say about the message of copyright takedowns and the ephemeral nature of corporate digital media.

morning snow

2010 October 25
 

2010-10-25 - morning snow.jpg

we had a surprise dump of white stuff overnight. the roads and paths were clear, as latent heat melted it quickly, but it accumulated everywhere else.