Phasor Burn

Warning: Do not look into phasor with remaining eye.

About

Yet another collection of random links and rantings of a greying unix geek with a photography bent. Pass the Guinness and Grecian Formula.

Archive for April, 2008

I had one of those dreams on the weekend. One where you are trying to rearrange items to fit into a space and no matter how hard you try, it never works. Not a very restful sleep.

In my case, I had a room in a datacentre. My own room, not a cage even. This had solid walls.

In the room were several rows of server racks. Fairly standard looking kit. I was trying to arrange a bunch of spares in cardboard boxes in such a way that they wouldn’t topple over, block airflow, etc. Nevermind that you are not supposed to keep flammable materials in the datacentre (something our colocation provider for work constantly reminds us of, but we have no onsite storage….)

The juggling and rearranging act was hampered further by the rectangular room not actually being fully rectangular. There was an unusable piece at one of the narrow ends due to a wire cage that was placed smack in the middle of that wall. With no way in (no door). Not even over the top or via the raised floor underneath.

It was most frustrating. If I could only get access to that extra bit of space I could maybe solve my spatial geometry problem.

bathysphere.jpeg Around that time for some reason we were starting to replace the regular 19″ racks with bathyspheres.

That made fitting everything into the racks/bathyspheres and the tottering towers of spares around them even more frustrating.

 

spinning-plates.jpgIt was like I was the variety show guy with the dozens of spinning plates
on sticks and I wasn’t getting to each of the about-to-fall towers of spares in time to steady them or shift some boxes from the middle of them jenga-style.

Eventually something bad was going to happen.

Oh no, it’s the exploding T-Rex. Again. Everyone get down!

tyrannosaurus-rex_1_original.jpg

Yes I actually said that in my dream. I vaguely remember that there was an exploding T-Rex in an earlier dream, before the datacentre episode. The T-Rex exploded and turned into volcanic ash at the same time, blowing all over.

This time was just the same, except now the ash was being sucked into all the servers.

Except for the ones which were safe in their good-to-20-thousand-fathoms bathyspheres.

I think I’m due for a vacation or something . . .

Lala Showers

Saturday, April 19th, 2008

Oh La La, Lala Showers Video!

Hats off to Ralph for finding this…

Update: Hi res still from the video shoot.

Unintentional Irony

Friday, April 18th, 2008

naziolympics.jpg

IMG_8843 copy, originally uploaded by dead-ro.


Unintentional irony from the ignorant of history department?

Viagra: You can do it, We can help

Thursday, April 17th, 2008

Ever notice the placement of the board adverts in the Saddledome? Camera left near the blue line there is “Viagra” and “Home Hardware”. Put them together and you get “Viagra: You can do it, we can help”.

Made even funnier in knowing the Viagra ad at one point (and may still be) was a temporary sheet of plastic that went up and down throughout the game…. meaning they didn’t pay for the entire game for that spot. Add in the time I was at the dome and the Viagra ad started to peel and droop mid-play :-)

Lost my Virginity to Ruby

Monday, April 14th, 2008

I’ve finally gotten off my arse and written my first Ruby script.

It’s not so hard; I don’t know why I haven’t tried before now. I am so used to my tried and true ksh/awk/sed toolset that I am averse to change I suppose.

The script below is running in production now. Nothing too fancy, just something called by cron that hits a few web pages in sequence, and takes care of some concurrency issues.

The php app at the other end needs to be prodded to look in it’s database for upcoming events and send email reminders out to the participants. The php developer couldn’t figure out how to queue or otherwise ensure that only one thread was sending reminders and updating the database at any time.

This is my best effort workaround until the php code can be fixed.

URL’s and file paths changed to protect the guilty.

There’s actually 5 urls in the real script, and probably will be another half dozen shortly.

#!/usr/bin/env ruby
#
# web-cron.rb

require "open-uri"

uri_list = [
	"https://domain/portal1/sendreminders.php",
	"https://domain/portal2/sendreminders.php",
]

# ensure only one of me is running at any point in time.
f = File.open($0, File::RDONLY)
f.flock(File::LOCK_EX | File::LOCK_NB) or exit

# ensure we are on the active web node
File.exist?("/cluster/usr/apache/conf/httpd.conf") or exit

# poll each uri
uri_list.each do |uri|
	puts "Polling  " + uri
	request = open(uri)
	request.close
end

f.close